[master] 5e3387f Try another way

Poul-Henning Kamp phk at FreeBSD.org
Wed Oct 4 09:35:06 UTC 2017


commit 5e3387fa73992cb1179aed69da3507dadbd97cc2
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Oct 4 09:34:45 2017 +0000

    Try another way

diff --git a/include/vdef.h b/include/vdef.h
index 12093bf..4af293c 100644
--- a/include/vdef.h
+++ b/include/vdef.h
@@ -131,9 +131,12 @@
 /*
  * Most of this nightmare is stolen from FreeBSD's <cdefs.h>
  */
+#ifndef __has_extension
+#  define __has_extension	0
+#endif
 #if defined(_Static_assert)
     /* Nothing, somebody already did this for us */
-#elif defined(__has_extension) && __has_extension(c_static_assert)
+#elif __has_extension(c_static_assert)
     /* Nothing, we should be fine */
 #elif (defined(__cplusplus) && __cplusplus >= 201103L) || \
        __has_extension(cxx_static_assert)


More information about the varnish-commit mailing list