diff options
author | Alexander <[email protected]> | 2021-09-08 21:59:43 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-09-08 12:59:43 -0700 |
commit | a3588c68f7026c49291a7ec92a78c69b22e15df1 (patch) | |
tree | e017cbb5e91aa7c9075e00e2400b462213bef114 /include/os/linux/spl | |
parent | f6166058219707ca379064a4529ae4ce87e4e64f (diff) |
Linux 5.15 compat: standalone <linux/stdarg.h>
Kernel commits
39f75da7bcc8 ("isystem: trim/fixup stdarg.h and other headers")
c0891ac15f04 ("isystem: ship and use stdarg.h")
564f963eabd1 ("isystem: delete global -isystem compile option")
(for now can be found in linux-next.git tree, will land into the
Linus' tree during the ongoing 5.15 cycle with one of akpm merges)
removed the -isystem flag and disallowed the inclusion of any
compiler header files. They also introduced a minimal
<linux/stdarg.h> as a replacement for <stdarg.h>.
include/os/linux/spl/sys/cmn_err.h in the ZFS source tree includes
<stdarg.h> unconditionally. Introduce a test for <linux/stdarg.h>
and include it instead of the compiler's one to prevent module
build breakage.
Reviewed-by: Tony Nguyen <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Lobakin <[email protected]>
Closes #12531
Diffstat (limited to 'include/os/linux/spl')
-rw-r--r-- | include/os/linux/spl/sys/cmn_err.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/os/linux/spl/sys/cmn_err.h b/include/os/linux/spl/sys/cmn_err.h index 79297067c..d2088371c 100644 --- a/include/os/linux/spl/sys/cmn_err.h +++ b/include/os/linux/spl/sys/cmn_err.h @@ -24,7 +24,11 @@ #ifndef _SPL_CMN_ERR_H #define _SPL_CMN_ERR_H +#if defined(_KERNEL) && defined(HAVE_STANDALONE_LINUX_STDARG) +#include <linux/stdarg.h> +#else #include <stdarg.h> +#endif #define CE_CONT 0 /* continuation */ #define CE_NOTE 1 /* notice */ |