From d442998e39611be6805ea261f2286a2fd00f49b1 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 8 Dec 2006 13:35:36 -0800 Subject: [PATCH] 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. --- os/utils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/os/utils.c b/os/utils.c index 9824501e7..82ec70458 100644 --- a/os/utils.c +++ b/os/utils.c @@ -53,12 +53,11 @@ OR PERFORMANCE OF THIS SOFTWARE. #include #endif +#ifndef __linux__ +#include +#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