From 9d4253ad6da85321d280a5fd2326f67a44a9716f Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 2 Jan 2020 22:30:31 -0500 Subject: [PATCH] Fixed build on FreeBSD. --- test/lib/thread_darwinunix.c | 2 ++ test/lib/timer_darwinunix.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/test/lib/thread_darwinunix.c b/test/lib/thread_darwinunix.c index 24ec21e4..a73f7ccd 100644 --- a/test/lib/thread_darwinunix.c +++ b/test/lib/thread_darwinunix.c @@ -1,6 +1,8 @@ // 28 april 2019 // TODO pin down minimum POSIX versions (depends on what macOS 10.8 conforms to and what GLib/GTK+ require) +// TODO also pin down which of these I should be defining, because apparently FreeBSD only checks for _XOPEN_SOURCE (and 2004 POSIX says that defining this as 600 *implies* _POSIX_C_SOURCE being 200112L so only _XOPEN_SOURCE is needed...) #define _POSIX_C_SOURCE 200112L +#define _XOPEN_SOURCE 600 #include #include #include diff --git a/test/lib/timer_darwinunix.c b/test/lib/timer_darwinunix.c index 974b7a57..1d7ece85 100644 --- a/test/lib/timer_darwinunix.c +++ b/test/lib/timer_darwinunix.c @@ -1,6 +1,8 @@ // 3 may 2019 // TODO pin down minimum POSIX versions (depends on what macOS 10.8 conforms to and what GLib/GTK+ require) +// TODO also pin down which of these I should be defining, because apparently FreeBSD only checks for _XOPEN_SOURCE (and 2004 POSIX says that defining this as 600 *implies* _POSIX_C_SOURCE being 200112L so only _XOPEN_SOURCE is needed...) #define _POSIX_C_SOURCE 200112L +#define _XOPEN_SOURCE 600 #include #include #include