]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Fix building on older versions of gcc
authorMichael Brown <mcb30@ipxe.org>
Tue, 2 Mar 2021 16:46:14 +0000 (16:46 +0000)
committerMichael Brown <mcb30@ipxe.org>
Tue, 2 Mar 2021 16:47:22 +0000 (16:47 +0000)
Versions of gcc prior to 9.1 do not support the single-argument form
of static_assert().  Fix by unconditionally defining a compatibility
macro for the single file that uses this.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/linux/linux_api.c

index 1f44b532ba0a03cf7352849433ae86e639f372dd..fa694330eec26682c078a58b0cc0b4116e59b784 100644 (file)
@@ -40,6 +40,9 @@
 #include <slirp/libslirp.h>
 #endif
 
+#undef static_assert
+#define static_assert(x) _Static_assert(x, #x)
+
 /** @file
  *
  * Linux host API