[6.0] 0777683d7 vdef: Centralize __has_feature(...) fallback
Reza Naghibi
reza at naghibi.com
Wed Apr 28 18:19:08 UTC 2021
commit 0777683d7f6ad648ad81119540365b5b6540650c
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Thu Apr 15 19:07:01 2021 +0200
vdef: Centralize __has_feature(...) fallback
Conflicts:
lib/libvarnish/binary_heap.c
diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c
index 2bf69a0e5..c87c891a6 100644
--- a/bin/varnishd/mgt/mgt_param.c
+++ b/bin/varnishd/mgt/mgt_param.c
@@ -43,10 +43,6 @@
#include "vav.h"
#include "vcli_serve.h"
-#if !defined(__has_feature)
-#define __has_feature(x) 0
-#endif
-
struct plist {
unsigned magic;
#define PLIST_MAGIC 0xbfc3ea16
diff --git a/include/vdef.h b/include/vdef.h
index f76407f80..60d833c33 100644
--- a/include/vdef.h
+++ b/include/vdef.h
@@ -64,6 +64,10 @@
*(fdp) = -1; \
} while (0)
+#if !defined(__has_feature)
+# define __has_feature(x) 0
+#endif
+
#ifndef __GNUC_PREREQ__
# if defined __GNUC__ && defined __GNUC_MINOR__
# define __GNUC_PREREQ__(maj, min) \
More information about the varnish-commit
mailing list