summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-09-07 02:39:51 +0100
committerGary E. Miller <gem@rellim.com>2016-09-07 02:41:11 +0100
commite14b909c25b48ef9a484ad5e9a7f765cafbf5d67 (patch)
tree41cca5bcbb554b6098599525a850fbb377003fbf /gpsd.c
parent8388375a95c1d7b02265a2932824c874463ffe47 (diff)
downloadgpsd-e14b909c25b48ef9a484ad5e9a7f765cafbf5d67.tar.gz
Hack around FreeBSD stupidity.
When FreeBSD turns on POSIX it disables BSd extenstions, with no possible workaraound. So just don;t ask for POSIX when then insanity becomes visible.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gpsd.c b/gpsd.c
index 8fa0b0eb..2e94813c 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -6,6 +6,8 @@
* BSD terms apply: see the file COPYING in the distribution root for details.
*/
+#ifdef __linux__
+/* FreeBSD chokes on this */
/* nice() needs _XOPEN_SOURCE, 500 means X/Open 1995 */
#define _XOPEN_SOURCE 500
/* setgroups() and daemon() needs _DEFAULT_SOURCE */
@@ -14,11 +16,7 @@
#define __DARWIN_C_LEVEL 200112L
/* strlcpy() needs _DARWIN_C_SOURCE */
#define _DARWIN_C_SOURCE
-
-/* for vsnprintf() FreeBSD wants __ISO_C_VISIBLE >= 1999 */
-#define __ISO_C_VISIBLE 1999
-/* for INADDR_LOOPBACK() FreeBSD wants __BSD_VISIBLE */
-#define __BSD_VISIBLE
+#endif /* __linux__ */
#include <sys/stat.h>
#include <sys/types.h>