summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-06-30 10:36:20 -0700
committerBrian Behlendorf <[email protected]>2010-06-30 12:49:12 -0700
commit79a3bf130b78cae41be339917788dde0b45c7d84 (patch)
treecb6111d1ffad3e307cad4498f77808adef06fa57 /configure
parentfd921c2e0c36c0c658031bc8bf4a3f912a3349f7 (diff)
Linux-2.6.33 compat, .ctl_name removed from struct ctl_table
As of linux-2.6.33 the ctl_name member of the ctl_table struct has been entirely removed. The upstream code has been updated to depend entirely on the the procname member. To handle this all references to ctl_name are wrapped in a CTL_NAME macro which simply expands to nothing for newer kernels. Older kernels are supported by having it expand to .ctl_name = X just as before.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure132
1 files changed, 132 insertions, 0 deletions
diff --git a/configure b/configure
index 47611aeec..fe3de76dc 100755
--- a/configure
+++ b/configure
@@ -12366,6 +12366,72 @@ fi
+
+ { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5
+$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; }
+
+
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/sysctl.h>
+
+int
+main (void)
+{
+
+ struct ctl_table ctl;
+ ctl.ctl_name = 0;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CTL_NAME 1
+_ACEOF
+
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+ rm -Rf build
+
+
+
{ $as_echo "$as_me:$LINENO: checking whether fls64() is available" >&5
$as_echo_n "checking whether fls64() is available... " >&6; }
@@ -15763,6 +15829,72 @@ fi
+
+ { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5
+$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; }
+
+
+cat >conftest.c <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/sysctl.h>
+
+int
+main (void)
+{
+
+ struct ctl_table ctl;
+ ctl.ctl_name = 0;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CTL_NAME 1
+_ACEOF
+
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+
+ rm -Rf build
+
+
+
{ $as_echo "$as_me:$LINENO: checking whether fls64() is available" >&5
$as_echo_n "checking whether fls64() is available... " >&6; }