aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2021-03-02 16:46:14 +0000
committerMichael Brown <mcb30@ipxe.org>2021-03-02 16:47:22 +0000
commit3b8aff94bfc7932cfed7198d48de6bc273fe951d (patch)
treec79fe0d3b92ab2b90323582693634e6d46a53a4e
parent2b5d3f582f718ca11488fb6d92ea39dd22b8ffed (diff)
downloadipxe-3b8aff94bfc7932cfed7198d48de6bc273fe951d.zip
ipxe-3b8aff94bfc7932cfed7198d48de6bc273fe951d.tar.gz
ipxe-3b8aff94bfc7932cfed7198d48de6bc273fe951d.tar.bz2
[build] Fix building on older versions of gcc
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>
-rw-r--r--src/interface/linux/linux_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/interface/linux/linux_api.c b/src/interface/linux/linux_api.c
index 1f44b53..fa69433 100644
--- a/src/interface/linux/linux_api.c
+++ b/src/interface/linux/linux_api.c
@@ -40,6 +40,9 @@
#include <slirp/libslirp.h>
#endif
+#undef static_assert
+#define static_assert(x) _Static_assert(x, #x)
+
/** @file
*
* Linux host API