Skip to content

Commit c631f5e

Browse files
robnbehlendorf
authored andcommitted
Linux: bump -std to gnu11
Linux switched from -std=gnu89 to -std=gnu11 in 5.18 (torvalds/linux@e8c07082a810f). We've always overridden that with gnu99 because we use some newer features. More recent kernels are using C11 features in headers that we include. GCC generally doesn't seem to care, but more recent versions of Clang seem to be enforcing our gnu99 override more strictly, which breaks the build in some configurations. Just bumping our "override" to match the kernel seems to be the easiest workaround. It's an effective no-op since 5.18, while still allowing us to build on older kernels. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #17954
1 parent 39303fe commit c631f5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

module/Kbuild.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# first. This ensures its module initialization function is run before
33
# any of the other module initialization functions which depend on it.
44

5-
ZFS_MODULE_CFLAGS += -std=gnu99 -Wno-declaration-after-statement
5+
ZFS_MODULE_CFLAGS += -std=gnu11 -Wno-declaration-after-statement
66
ZFS_MODULE_CFLAGS += -Wmissing-prototypes
77
ZFS_MODULE_CFLAGS += @KERNEL_DEBUG_CFLAGS@ @KERNEL_NO_FORMAT_ZERO_LENGTH@
88

0 commit comments

Comments
 (0)