ccan_tokenizer, check_type, container_of, typesafe_cb: handle !HAVE_TYPEOF
[ccan] / ccan / container_of / test / compile_fail-var-types.c
index 5c7767985223b62259a7cea1c08c0dd8e60fc630..b7f395c761e7e91a327ef45bc86bec3d14454430 100644 (file)
@@ -1,4 +1,4 @@
-#include "container_of/container_of.h"
+#include <ccan/container_of/container_of.h>
 #include <stdlib.h>
 
 struct foo {
@@ -14,6 +14,9 @@ int main(int argc, char *argv[])
 #ifdef FAIL
        /* b is a char, but intp is an int * */
        foop = container_of_var(intp, foop, b);
+#if !HAVE_TYPEOF
+#error "Unfortunately we don't fail if we don't have typeof."
+#endif
 #else
        foop = NULL;
 #endif