hsa: Undef libepoll-shims close on FreeBSD 88/40388/4
authorTom Jones <thj@freebsd.org>
Wed, 31 Jan 2024 09:33:16 +0000 (09:33 +0000)
committerFlorin Coras <florin.coras@gmail.com>
Mon, 26 Feb 2024 18:04:11 +0000 (18:04 +0000)
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>
src/plugins/hs_apps/vcl/vcl_test_server.c

index 6ce9130..d17a208 100644 (file)
 #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;