]> tinc-vpn.org Git - tinc/blobdiff - src/have.h
Add check for __Static_assert() and asserts on struct sizes
[tinc] / src / have.h
index 36d17b6096d3cca7dbe65c68d70131d785c7d8c6..2428151af6c10946e5075480d3b1227c2f185345 100644 (file)
 #include <math.h>
 #include <time.h>
 
 #include <math.h>
 #include <time.h>
 
+#ifdef HAVE_STATIC_ASSERT
+#define STATIC_ASSERT(expr, msg) _Static_assert((expr), msg)
+#else
+#define STATIC_ASSERT(check, msg)
+#endif
+
 #ifdef HAVE_ALLOCA_H
 #include <alloca.h>
 #elif defined(HAVE_NETBSD)
 #ifdef HAVE_ALLOCA_H
 #include <alloca.h>
 #elif defined(HAVE_NETBSD)