diff options
author | Eric Anholt <eric@anholt.net> | 2007-01-10 13:10:43 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-01-10 13:10:43 -0800 |
commit | 7fccec91c46baac4f8d2965180dc535b4eb7d65c (patch) | |
tree | a2a8ee79ad1675e23396c6661bc0ce8f0598ab0f /os/utils.c | |
parent | 78f9592c112d4245f6119b98c244bbb4cae3e5aa (diff) |
Bug #9555: Always define _GNU_SOURCE in glibc environments.
This keeps us from having to define _POSIX_C_SOURCE, _BSD_SOURCE, and
_XOPEN_SORUCE to get the C environment we want in different places. It also
fixes the build on linux due to RTLD_DEFAULT having not been defined.
Diffstat (limited to 'os/utils.c')
-rw-r--r-- | os/utils.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/os/utils.c b/os/utils.c index b98c9c1fd..7c725e38d 100644 --- a/os/utils.c +++ b/os/utils.c @@ -53,23 +53,6 @@ OR PERFORMANCE OF THIS SOFTWARE. #include <dix-config.h> #endif -#ifndef __GLIBC__ -#include <time.h> -#else -/* The world's most shocking hack, to ensure we get clock_gettime() and - * CLOCK_MONOTONIC. */ -#ifdef _POSIX_C_SOURCE -#define _SAVED_POSIX_C_SOURCE _POSIX_C_SOURCE -#undef _POSIX_C_SOURCE -#endif -#define _POSIX_C_SOURCE 199309L -#include <time.h> -#undef _POSIX_C_SOURCE -#ifdef _SAVED_POSIX_C_SOURCE -#define _POSIX_C_SOURCE _SAVED_POSIX_C_SOURCE -#endif -#endif /* __linux__ */ - #ifdef __CYGWIN__ #include <stdlib.h> #include <signal.h> @@ -80,6 +63,7 @@ OR PERFORMANCE OF THIS SOFTWARE. #endif #include <X11/Xos.h> #include <stdio.h> +#include <time.h> #include "misc.h" #include <X11/X.h> #define XSERV_t |