diff options
author | Brian Behlendorf <[email protected]> | 2010-06-30 10:36:20 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-06-30 12:49:12 -0700 |
commit | 79a3bf130b78cae41be339917788dde0b45c7d84 (patch) | |
tree | cb6111d1ffad3e307cad4498f77808adef06fa57 /config/spl-build.m4 | |
parent | fd921c2e0c36c0c658031bc8bf4a3f912a3349f7 (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 'config/spl-build.m4')
-rw-r--r-- | config/spl-build.m4 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4 index c6f47b68f..135783cdc 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -36,6 +36,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_PATH_IN_NAMEIDATA SPL_AC_TASK_CURR SPL_AC_CTL_UNNUMBERED + SPL_AC_CTL_NAME SPL_AC_FLS64 SPL_AC_DEVICE_CREATE SPL_AC_5ARGS_DEVICE_CREATE @@ -642,6 +643,25 @@ AC_DEFUN([SPL_AC_CTL_UNNUMBERED], ]) dnl # +dnl # 2.6.33 API change, +dnl # Removed .ctl_name from struct ctl_table. +dnl # +AC_DEFUN([SPL_AC_CTL_NAME], [ + AC_MSG_CHECKING([whether struct ctl_table has ctl_name]) + SPL_LINUX_TRY_COMPILE([ + #include <linux/sysctl.h> + ],[ + struct ctl_table ctl; + ctl.ctl_name = 0; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_CTL_NAME, 1, [struct ctl_table has ctl_name]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # dnl # 2.6.16 API change. dnl # Check if 'fls64()' is available dnl # |