summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--src/pulsecore/core-rtclock.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 5b41bb47..e2b5a6aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,7 +89,6 @@ case $host in
AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
;;
*-*-darwin* )
- AC_DEFINE([_POSIX_C_SOURCE], [200112L], [Needed to get clock_gettime on Mac OS X])
AC_DEFINE([_DARWIN_C_SOURCE], [200112L], [Needed to get NSIG on Mac OS X])
;;
esac
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>