Page MenuHomeFreeBSD

D43239.id147908.diff
No OneTemporary

D43239.id147908.diff

diff --git a/sys/compat/linuxkpi/common/include/linux/build_bug.h b/sys/compat/linuxkpi/common/include/linux/build_bug.h
--- a/sys/compat/linuxkpi/common/include/linux/build_bug.h
+++ b/sys/compat/linuxkpi/common/include/linux/build_bug.h
@@ -59,7 +59,4 @@
#define BUILD_BUG_ON_INVALID(expr) while (0) { (void)(expr); }
#define BUILD_BUG_ON_ZERO(x) ((int)sizeof(struct { int:-((x) != 0); }))
-#define static_assert(x, ...) __static_assert(x, ##__VA_ARGS__, #x)
-#define __static_assert(x, msg, ...) _Static_assert(x, msg)
-
#endif
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -367,7 +367,7 @@
.PHONY: ${PHONY_NOTMAIN}
.NOTMAIN: ${PHONY_NOTMAIN}
-CSTD?= gnu99
+CSTD?= gnu17
# c99/gnu99 is the minimum C standard version supported for kernel build
.if ${CSTD} == "k&r" || ${CSTD} == "c89" || ${CSTD} == "c90" || \
diff --git a/sys/contrib/zstd/lib/freebsd/assert.h b/sys/contrib/zstd/lib/freebsd/assert.h
new file mode 100644
--- /dev/null
+++ b/sys/contrib/zstd/lib/freebsd/assert.h
@@ -0,0 +1,2 @@
+/* This file is in the public domain */
+#include <sys/systm.h>
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -590,6 +590,9 @@
#define __witness_used __unused
#endif
+#define static_assert(x, ...) __static_assert(x, ##__VA_ARGS__, #x)
+#define __static_assert(x, msg, ...) _Static_assert(x, msg)
+
#endif /* _KERNEL */
__NULLABILITY_PRAGMA_POP

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 17, 10:32 PM (7 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27700252
Default Alt Text
D43239.id147908.diff (1 KB)

Event Timeline