diff --git a/ext/pango/gstclockoverlay.c b/ext/pango/gstclockoverlay.c index 1a0258d210..ba8e625e65 100644 --- a/ext/pango/gstclockoverlay.c +++ b/ext/pango/gstclockoverlay.c @@ -75,6 +75,9 @@ static void gst_clock_overlay_get_property (GObject * object, guint prop_id, static gchar * gst_clock_overlay_render_time (GstClockOverlay * overlay) { +#ifdef HAVE_LOCALTIME_R + struct tm dummy; +#endif struct tm *t; time_t now; gchar buf[256]; @@ -82,14 +85,10 @@ gst_clock_overlay_render_time (GstClockOverlay * overlay) now = time (NULL); #ifdef HAVE_LOCALTIME_R - { - struct tm dummy; - - /* Need to call tzset explicitly when calling localtime_r for changes - * to the timezone between calls to be visible. */ - tzset (); - t = localtime_r (&now, &dummy); - } + /* Need to call tzset explicitly when calling localtime_r for changes + * to the timezone between calls to be visible. */ + tzset (); + t = localtime_r (&now, &dummy); #else /* on win32 this apparently returns a per-thread struct which would be fine */ t = localtime (&now);