summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/core-rtclock.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2011-04-22 02:27:35 +0200
committerColin Guthrie <colin@mageia.org>2011-04-23 18:23:37 +0100
commit98f2209663596ec7d022af2aa8328ef224f2b80b (patch)
treed8a4b6d6827c97f5737ff7b0ea12262a52b1a7c1 /src/pulsecore/core-rtclock.c
parent7a3b3a376308df191b19b73fe8dbe97659a1061a (diff)
pulsecore:: Define _POSIX_C_SOURCE locally for rtclock on OSX
Defining this macro on a global level is disadvantageous for other APIs, and as we need it for clock_gettime() only on Mac OS X, define it locally in pulsecore/core-rtclock.c only.
Diffstat (limited to 'src/pulsecore/core-rtclock.c')
-rw-r--r--src/pulsecore/core-rtclock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pulsecore/core-rtclock.c b/src/pulsecore/core-rtclock.c
index 331ac112..6632cc6d 100644
--- a/src/pulsecore/core-rtclock.c
+++ b/src/pulsecore/core-rtclock.c
@@ -24,6 +24,10 @@
#include <config.h>
#endif
+#ifdef OS_IS_DARWIN
+#define _POSIX_C_SOURCE 1
+#endif
+
#include <stddef.h>
#include <time.h>
#include <sys/time.h>