POSIX clock_gettime() isn't available on Linux before 2.6, and the symbol may
authorRyan C. Gordon
Tue, 11 Oct 2005 20:05:54 +0000
changeset 1158ec446adf8cb2
parent 1157 baf35853ad54
child 1159 787b8d2c23e4
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
     1.1 --- a/src/timer/linux/SDL_systimer.c	Tue Oct 11 18:16:12 2005 +0000
     1.2 +++ b/src/timer/linux/SDL_systimer.c	Tue Oct 11 20:05:54 2005 +0000
     1.3 @@ -41,7 +41,13 @@
     1.4  */
     1.5  #if (defined _POSIX_TIMERS && _POSIX_TIMERS > 0)
     1.6  #include <time.h>
     1.7 -#define USE_CLOCK_GETTIME
     1.8 +/*
     1.9 + * clock_gettime() is missing in my system's glibc, and apparently isn't
    1.10 + *  available before Linux kernel 2.6...you can uncomment the following
    1.11 + *  define to use it, since it may be a better solution than
    1.12 + *  gettimeofday() on systems that support the newer syscall.  --ryan.
    1.13 + */
    1.14 +/*#define USE_CLOCK_GETTIME*/
    1.15  #endif
    1.16  
    1.17  #include "SDL_error.h"