summaryrefslogtreecommitdiff
path: root/os/utils.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2006-12-08 13:35:36 -0800
committerEric Anholt <eric@anholt.net>2006-12-19 10:56:08 -0800
commitd442998e39611be6805ea261f2286a2fd00f49b1 (patch)
tree5d7775445f003907abf1838e97753c633f761039 /os/utils.c
parent228b9f77696190e47d4c96d6e0809bf645751557 (diff)
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.
Diffstat (limited to 'os/utils.c')
-rw-r--r--os/utils.c8
1 files 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 <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>