]>
Commit | Line | Data |
---|---|---|
a3588c68 AL |
1 | dnl # |
2 | dnl # Linux 5.15 gets rid of -isystem and external <stdarg.h> inclusion | |
3 | dnl # and ships its own <linux/stdarg.h>. Check if this header file does | |
4 | dnl # exist and provide all necessary definitions for variable argument | |
5 | dnl # functions. Adjust the inclusion of <stdarg.h> according to the | |
6 | dnl # results. | |
7 | dnl # | |
8 | AC_DEFUN([ZFS_AC_KERNEL_SRC_STANDALONE_LINUX_STDARG], [ | |
9 | ZFS_LINUX_TEST_SRC([has_standalone_linux_stdarg], [ | |
10 | #include <linux/stdarg.h> | |
11 | ||
12 | #if !defined(va_start) || !defined(va_end) || \ | |
13 | !defined(va_arg) || !defined(va_copy) | |
14 | #error "<linux/stdarg.h> is invalid" | |
15 | #endif | |
16 | ],[]) | |
17 | ]) | |
18 | ||
19 | AC_DEFUN([ZFS_AC_KERNEL_STANDALONE_LINUX_STDARG], [ | |
20 | dnl # | |
21 | dnl # Linux 5.15 ships its own stdarg.h and doesn't allow to | |
22 | dnl # include compiler headers. | |
23 | dnl # | |
24 | AC_MSG_CHECKING([whether standalone <linux/stdarg.h> exists]) | |
25 | ZFS_LINUX_TEST_RESULT([has_standalone_linux_stdarg], [ | |
26 | AC_MSG_RESULT([yes]) | |
27 | AC_DEFINE(HAVE_STANDALONE_LINUX_STDARG, 1, | |
28 | [standalone <linux/stdarg.h> exists]) | |
29 | ],[ | |
30 | AC_MSG_RESULT([no]) | |
31 | ]) | |
32 | ]) |