Merge pull request #1398 from johalun/freebsd-fix

Fix build on FreeBSD adjusting/removing _XOPEN_SOURCE declaration.
This commit is contained in:
Drew DeVault 2017-10-14 16:32:50 -04:00
parent bfc5150328
commit d3c2b5f951
2 changed files with 5 additions and 1 deletions

View file

@ -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 <errno.h>
#include <string.h>
#include <sys/socket.h>

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 700
#include <stdlib.h>
#include <string.h>
#include <unistd.h>