mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
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.
This commit is contained in:
parent
7a3b3a3763
commit
98f2209663
2 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue