Author: mikej Date: Sat Mar 22 20:22:18 2008 New Revision: 7950 Modified: freeswitch/trunk/src/switch_time.c Log: deal with linux platforms that have clock_gettime but don't define CLOCK_MONOTONIC. (FSCORE-111) Modified: freeswitch/trunk/src/switch_time.c ============================================================================== --- freeswitch/trunk/src/switch_time.c (original) +++ freeswitch/trunk/src/switch_time.c Sat Mar 22 20:22:18 2008 @@ -95,7 +95,7 @@ return now; } -#if defined(HAVE_CLOCK_GETTIME) +#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC) static int MONO = 1; #else static int MONO = 0; @@ -105,7 +105,7 @@ { switch_time_t now; -#if defined(HAVE_CLOCK_GETTIME) +#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC) if (MONO) { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); @@ -114,7 +114,7 @@ #endif now = switch_time_now(); -#if defined(HAVE_CLOCK_GETTIME) +#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC) } #endif
participants (1)
-
Freeswitch SVN