summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorTom Jones <thj@freebsd.org>2024-01-31 09:33:16 +0000
committerFlorin Coras <florin.coras@gmail.com>2024-02-26 18:04:11 +0000
commit5bce60353cb227fd9c39d3b8fefa2414c1c1c50f (patch)
tree3b26658a42b55a5513a3fbd5ecd0321018b71d34 /src/plugins
parent84847c4762e48d600e1ce506631937483e09c8d8 (diff)
hsa: Undef libepoll-shims close on FreeBSD
libepoll-shim has some hacks to enable functionality, one of these redefines close as a macro. This conflicts with a close call back. On FreeBSD undefine this macro at point of use. Type: improvement Change-Id: I7b4f7cd874f3451d76c580cf999369426d9e89c2 Signed-off-by: Tom Jones <thj@freebsd.org>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/hs_apps/vcl/vcl_test_server.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/hs_apps/vcl/vcl_test_server.c b/src/plugins/hs_apps/vcl/vcl_test_server.c
index 6ce91301419..d17a2089ba7 100644
--- a/src/plugins/hs_apps/vcl/vcl_test_server.c
+++ b/src/plugins/hs_apps/vcl/vcl_test_server.c
@@ -28,6 +28,17 @@
#include <vppinfra/mem.h>
#include <pthread.h>
+/*
+ * XXX: Unfortunately libepoll-shim requires some hacks to work, one of these
+ * defines 'close' as a macro. This collides with vcl test callback 'close'.
+ * Undef the 'close' macro on FreeBSD if it exists.
+ */
+#ifdef __FreeBSD__
+#ifdef close
+#undef close
+#endif
+#endif /* __FreeBSD__ */
+
typedef struct
{
uint16_t port;