From d3c2b5f95146d926577e069d6c5d8869e5b66dfe Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 14 Oct 2017 16:32:50 -0400 Subject: [PATCH] Merge pull request #1398 from johalun/freebsd-fix Fix build on FreeBSD adjusting/removing _XOPEN_SOURCE declaration. --- sway/ipc-server.c | 4 ++++ swaybar/status_line.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sway/ipc-server.c b/sway/ipc-server.c index 4ce2b7ebe..b560b9306 100644 --- a/sway/ipc-server.c +++ b/sway/ipc-server.c @@ -1,6 +1,10 @@ // See https://i3wm.org/docs/ipc.html for protocol information +#ifndef __FreeBSD__ +// Any value will hide SOCK_CLOEXEC on FreeBSD (__BSD_VISIBLE=0) #define _XOPEN_SOURCE 700 +#endif + #include #include #include diff --git a/swaybar/status_line.c b/swaybar/status_line.c index e0564c269..cc324fdb7 100644 --- a/swaybar/status_line.c +++ b/swaybar/status_line.c @@ -1,4 +1,4 @@ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 700 #include #include #include