From cb70b78c443de5f8b95c4469dd8eb7f77af880ed Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sat, 26 Jun 2021 00:20:17 +0200 Subject: build: Fix compilation with fuse (RIB) on FreeBSD Compilation failed on FreeBSD 14 with fuse enabled because of some missing definitions. __XSI_VISIBLE must be set before including for some definitions in . FreeBSD doesn't know the MSG_CONFIRM flag to sendto() or CLOCK_REALTIME_COARSE, which are Linux-specific. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/rib.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/rib.c b/src/lib/rib.c index d9f59a3e..0418252b 100644 --- a/src/lib/rib.c +++ b/src/lib/rib.c @@ -24,6 +24,10 @@ #include "config.h" +#if defined (__FreeBSD__) +#define __XSI_VISIBLE 500 +#endif + #include #include #include @@ -41,9 +45,7 @@ #define FUSE_USE_VERSION 26 #if defined (__linux__) #define __USE_XOPEN -#elif defined (__FreeBSD__) -#define __XSI_VISIBLE 500 -#endif +#endif /* __linux__ */ #include #ifndef CLOCK_REALTIME_COARSE @@ -266,7 +268,6 @@ static void * fuse_thr(void * o) } #endif /* HAVE_FUSE */ - int rib_init(const char * mountpt) { #ifdef HAVE_FUSE -- cgit v1.2.3