]> granicus.if.org Git - zfs/blob - config/kernel-sched.m4
Stack overflow in recursive bpobj_iterate_impl
[zfs] / config / kernel-sched.m4
1 dnl #
2 dnl # 3.9 API change,
3 dnl # Moved things from linux/sched.h to linux/sched/rt.h
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_SCHED_RT_HEADER],
6         [AC_MSG_CHECKING([whether header linux/sched/rt.h exists])
7         ZFS_LINUX_TRY_COMPILE([
8                 #include <linux/sched.h>
9                 #include <linux/sched/rt.h>
10         ],[
11                 return 0;
12         ],[
13                 AC_DEFINE(HAVE_SCHED_RT_HEADER, 1, [linux/sched/rt.h exists])
14                 AC_MSG_RESULT(yes)
15         ],[
16                 AC_MSG_RESULT(no)
17         ])
18 ])
19
20 dnl #
21 dnl # 4.11 API change,
22 dnl # Moved things from linux/sched.h to linux/sched/signal.h
23 dnl #
24 AC_DEFUN([ZFS_AC_KERNEL_SCHED_SIGNAL_HEADER],
25         [AC_MSG_CHECKING([whether header linux/sched/signal.h exists])
26         ZFS_LINUX_TRY_COMPILE([
27                 #include <linux/sched.h>
28                 #include <linux/sched/signal.h>
29         ],[
30                 return 0;
31         ],[
32                 AC_DEFINE(HAVE_SCHED_SIGNAL_HEADER, 1, [linux/sched/signal.h exists])
33                 AC_MSG_RESULT(yes)
34         ],[
35                 AC_MSG_RESULT(no)
36         ])
37 ])
38 dnl #
39 dnl # 3.19 API change
40 dnl # The io_schedule_timeout() function is present in all 2.6.32 kernels
41 dnl # but it was not exported until Linux 3.19.  The RHEL 7.x kernels which
42 dnl # are based on a 3.10 kernel do export this symbol.
43 dnl #
44 AC_DEFUN([ZFS_AC_KERNEL_IO_SCHEDULE_TIMEOUT], [
45         AC_MSG_CHECKING([whether io_schedule_timeout() is available])
46         ZFS_LINUX_TRY_COMPILE_SYMBOL([
47                 #include <linux/sched.h>
48         ], [
49                 (void) io_schedule_timeout(1);
50         ], [io_schedule_timeout], [], [
51                 AC_MSG_RESULT(yes)
52                 AC_DEFINE(HAVE_IO_SCHEDULE_TIMEOUT, 1, [yes])
53         ],[
54                 AC_MSG_RESULT(no)
55         ])
56 ])