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
8 AC_DEFUN([ZFS_AC_KERNEL_SRC_STANDALONE_LINUX_STDARG], [
9 ZFS_LINUX_TEST_SRC([has_standalone_linux_stdarg], [
10 #include <linux/stdarg.h>
12 #if !defined(va_start) || !defined(va_end) || \
13 !defined(va_arg) || !defined(va_copy)
14 #error "<linux/stdarg.h> is invalid"
19 AC_DEFUN([ZFS_AC_KERNEL_STANDALONE_LINUX_STDARG], [
21 dnl # Linux 5.15 ships its own stdarg.h and doesn't allow to
22 dnl # include compiler headers.
24 AC_MSG_CHECKING([whether standalone <linux/stdarg.h> exists])
25 ZFS_LINUX_TEST_RESULT([has_standalone_linux_stdarg], [
27 AC_DEFINE(HAVE_STANDALONE_LINUX_STDARG, 1,
28 [standalone <linux/stdarg.h> exists])