configure: fix _Static_assert check
authorOmri Mor <omor1@asu.edu>
Mon, 22 May 2017 00:43:01 +0000 (17:43 -0700)
committerOmri Mor <omor1@asu.edu>
Mon, 22 May 2017 00:43:01 +0000 (17:43 -0700)
Signed-off-by: Omri Mor <omor1@asu.edu>
configure

index 21bcaf46604980a27ccfbe0f32acceead6067c4e..03275787c4d074b808bec2cd47f85337d68aa970 100755 (executable)
--- a/configure
+++ b/configure
@@ -1930,16 +1930,7 @@ fi
 cat > $TMPC << EOF
 #include <assert.h>
 #include <stdlib.h>
-#undef offsetof
-#ifdef __compiler_offsetof
-#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
-#else
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-#endif
-
-#define container_of(ptr, type, member) ({                     \
-       const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
-       (type *)( (char *)__mptr - offsetof(type,member) );})
+#include <stddef.h>
 
 struct foo {
   int a, b;