aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/config/kernel-kstrtoul.m4
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/openzfs/config/kernel-kstrtoul.m4')
-rw-r--r--sys/contrib/openzfs/config/kernel-kstrtoul.m421
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/contrib/openzfs/config/kernel-kstrtoul.m4 b/sys/contrib/openzfs/config/kernel-kstrtoul.m4
new file mode 100644
index 000000000000..8e4b542978a9
--- /dev/null
+++ b/sys/contrib/openzfs/config/kernel-kstrtoul.m4
@@ -0,0 +1,21 @@
+dnl #
+dnl # 2.6.39 API change
+dnl # Added kstrtoul()
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_SRC_KSTRTOUL], [
+ ZFS_LINUX_TEST_SRC([kstrtoul], [
+ #include <linux/kernel.h>
+ ],[
+ int ret __attribute__ ((unused)) = kstrtoul(NULL, 10, NULL);
+ ])
+])
+
+AC_DEFUN([ZFS_AC_KERNEL_KSTRTOUL], [
+ AC_MSG_CHECKING([whether kstrtoul() exists])
+ ZFS_LINUX_TEST_RESULT([kstrtoul], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_KSTRTOUL, 1, [kstrtoul() exists])
+ ],[
+ ZFS_LINUX_TEST_ERROR([kstrtoul()])
+ ])
+])