Skip to content

Commit

Permalink
POSIX clock_gettime() isn't available on Linux before 2.6, and the sy…
Browse files Browse the repository at this point in the history
…mbol may

 just be flat out missing from glibc, so force use of previous gettimeofday()
 behaviour for now.
  • Loading branch information
icculus committed Oct 11, 2005
1 parent d11baf2 commit 8b4199c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/timer/linux/SDL_systimer.c
Expand Up @@ -41,7 +41,13 @@ static char rcsid =
*/
#if (defined _POSIX_TIMERS && _POSIX_TIMERS > 0)
#include <time.h>
#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"
Expand Down

0 comments on commit 8b4199c

Please sign in to comment.