Only do the _POSIX_C_SOURCE hackery on linux where it's required.
On other OSes, the nasty hack was resulting in prototypes being hidden, so just don't do it.
This commit is contained in:
parent
228b9f7769
commit
d442998e39
|
@ -53,12 +53,11 @@ OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#ifndef __linux__
|
||||
#include <time.h>
|
||||
#else
|
||||
/* The world's most shocking hack, to ensure we get clock_gettime() and
|
||||
* CLOCK_MONOTONIC. */
|
||||
#ifdef sun /* Needed to tell Solaris headers not to restrict to */
|
||||
#define __EXTENSIONS__ /* only the functions defined in POSIX 199309. */
|
||||
#endif
|
||||
|
||||
#ifdef _POSIX_C_SOURCE
|
||||
#define _SAVED_POSIX_C_SOURCE _POSIX_C_SOURCE
|
||||
#undef _POSIX_C_SOURCE
|
||||
|
@ -69,6 +68,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifdef _SAVED_POSIX_C_SOURCE
|
||||
#define _POSIX_C_SOURCE _SAVED_POSIX_C_SOURCE
|
||||
#endif
|
||||
#endif /* __linux__ */
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
#include <stdlib.h>
|
||||
|
|
Loading…
Reference in New Issue
Block a user