Add configure check for user_path_dir()

I didn't notice at the time but user_path_dir() was not introduced
at the same time as set_fs_pwd() change.  I had lumped the two
together but in fact user_path_dir() was introduced in 2.6.27 and
set_fs_pwd() taking 2 args was introduced in 2.6.25.  This means
builds against 2.6.25-2.6.26 kernels were broken.

To fix this I've added a check for user_path_dir() and no longer
assume that if set_fs_pwd() takes 2 args then user_path_dir() is
also available.
This commit is contained in:
Brian Behlendorf
2010-07-01 13:37:43 -07:00
parent e2d28a3743
commit 7119bf7044
4 changed files with 116 additions and 1 deletions
Vendored
+82
View File
@@ -14459,6 +14459,47 @@ fi
{ $as_echo "$as_me:$LINENO: checking whether symbol user_path_at is exported" >&5
$as_echo_n "checking whether symbol user_path_at is exported... " >&6; }
grep -q -E '[[:space:]]user_path_at[[:space:]]' \
$LINUX_OBJ/Module*.symvers 2>/dev/null
rc=$?
if test $rc -ne 0; then
export=0
for file in ; do
grep -q -E "EXPORT_SYMBOL.*(user_path_at)" \
"$LINUX_OBJ/$file" 2>/dev/null
rc=$?
if test $rc -eq 0; then
export=1
break;
fi
done
if test $export -eq 0; then
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
else
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_USER_PATH_DIR 1
_ACEOF
fi
else
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_USER_PATH_DIR 1
_ACEOF
fi
{ $as_echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5
$as_echo_n "checking whether symbol set_fs_pwd is exported... " >&6; }
grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \
@@ -17931,6 +17972,47 @@ fi
{ $as_echo "$as_me:$LINENO: checking whether symbol user_path_at is exported" >&5
$as_echo_n "checking whether symbol user_path_at is exported... " >&6; }
grep -q -E '[[:space:]]user_path_at[[:space:]]' \
$LINUX_OBJ/Module*.symvers 2>/dev/null
rc=$?
if test $rc -ne 0; then
export=0
for file in ; do
grep -q -E "EXPORT_SYMBOL.*(user_path_at)" \
"$LINUX_OBJ/$file" 2>/dev/null
rc=$?
if test $rc -eq 0; then
export=1
break;
fi
done
if test $export -eq 0; then
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
else
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_USER_PATH_DIR 1
_ACEOF
fi
else
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_USER_PATH_DIR 1
_ACEOF
fi
{ $as_echo "$as_me:$LINENO: checking whether symbol set_fs_pwd is exported" >&5
$as_echo_n "checking whether symbol set_fs_pwd is exported... " >&6; }
grep -q -E '[[:space:]]set_fs_pwd[[:space:]]' \