summaryrefslogtreecommitdiff
path: root/timehint.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 /timehint.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 'timehint.c')
-rw-r--r--timehint.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/timehint.c b/timehint.c
index c8b4bb84..af1fc700 100644
--- a/timehint.c
+++ b/timehint.c
@@ -8,12 +8,15 @@
* 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
/* snprintf() needs __DARWIN_C_LEVEL >= 200112L */
#define __DARWIN_C_LEVEL 200112L
/* snprintf() needs _DARWIN_C_SOURCE */
#define _DARWIN_C_SOURCE
+#endif /* __linux__ */
#include <string.h>
#include <libgen.h>