clock: Do use HAVE_CLOCK_GETTIME

Fixes #697549
This commit is contained in:
Руслан Ижбулатов 2013-04-08 15:30:07 +04:00 committed by Sebastian Dröge
parent ff62f3f1e0
commit e745a2bcf0
2 changed files with 4 additions and 3 deletions

View file

@ -521,7 +521,7 @@ gst_system_clock_get_internal_time (GstClock * clock)
GST_SECOND, sysclock->priv->frequency.QuadPart); GST_SECOND, sysclock->priv->frequency.QuadPart);
} else } else
#endif /* G_OS_WIN32 */ #endif /* G_OS_WIN32 */
#if !defined HAVE_POSIX_TIMERS #if !defined HAVE_POSIX_TIMERS || !defined HAVE_CLOCK_GETTIME
{ {
GTimeVal timeval; GTimeVal timeval;
@ -555,7 +555,7 @@ gst_system_clock_get_resolution (GstClock * clock)
return GST_SECOND / sysclock->priv->frequency.QuadPart; return GST_SECOND / sysclock->priv->frequency.QuadPart;
} else } else
#endif /* G_OS_WIN32 */ #endif /* G_OS_WIN32 */
#ifdef HAVE_POSIX_TIMERS #if defined(HAVE_POSIX_TIMERS) && defined(HAVE_CLOCK_GETTIME)
{ {
GstSystemClock *sysclock = GST_SYSTEM_CLOCK_CAST (clock); GstSystemClock *sysclock = GST_SYSTEM_CLOCK_CAST (clock);
clockid_t ptype; clockid_t ptype;

View file

@ -3096,7 +3096,8 @@ gst_parse_bin_from_description_full (const gchar * bin_description,
GstClockTime GstClockTime
gst_util_get_timestamp (void) gst_util_get_timestamp (void)
{ {
#if defined (HAVE_POSIX_TIMERS) && defined(HAVE_MONOTONIC_CLOCK) #if defined (HAVE_POSIX_TIMERS) && defined(HAVE_MONOTONIC_CLOCK) &&\
defined (HAVE_CLOCK_GETTIME)
struct timespec now; struct timespec now;
clock_gettime (CLOCK_MONOTONIC, &now); clock_gettime (CLOCK_MONOTONIC, &now);