From 8b4199c97fb63fd32dd06e1de47313e50acc69fd Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 11 Oct 2005 20:05:54 +0000 Subject: [PATCH] POSIX clock_gettime() isn't available on Linux before 2.6, and the symbol may just be flat out missing from glibc, so force use of previous gettimeofday() behaviour for now. --- src/timer/linux/SDL_systimer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/timer/linux/SDL_systimer.c b/src/timer/linux/SDL_systimer.c index cdca6ced0..e2b0fa7ca 100644 --- a/src/timer/linux/SDL_systimer.c +++ b/src/timer/linux/SDL_systimer.c @@ -41,7 +41,13 @@ static char rcsid = */ #if (defined _POSIX_TIMERS && _POSIX_TIMERS > 0) #include -#define USE_CLOCK_GETTIME +/* + * clock_gettime() is missing in my system's glibc, and apparently isn't + * available before Linux kernel 2.6...you can uncomment the following + * define to use it, since it may be a better solution than + * gettimeofday() on systems that support the newer syscall. --ryan. + */ +/*#define USE_CLOCK_GETTIME*/ #endif #include "SDL_error.h"