]> git.sesse.net Git - vlc/commitdiff
* record: grrr, support for system that doesn't have localtime_r.
authorLaurent Aimar <fenrir@videolan.org>
Thu, 28 Apr 2005 07:43:09 +0000 (07:43 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Thu, 28 Apr 2005 07:43:09 +0000 (07:43 +0000)
modules/access_filter/record.c

index 1ad8e2d934506156e167c1b4aa457917ce296dcc..55e18e7974297cba52c74b609d92ec98ce16c1b5 100644 (file)
@@ -325,8 +325,19 @@ static void Dump( access_t *p_access, uint8_t *p_buffer, int i_buffer )
         time_t t = time(NULL);
         struct tm l;
 
+#ifdef HAVE_LOCALTIME_R
         if( !localtime_r( &t, &l ) )
             memset( &l, 0, sizeof(l) );
+#else
+        /* Grrr */
+        {
+            struct tm *p_l = localtime( &t );
+            if( p_l )
+                l = *pÃ_l;
+            else
+                memset( &l, 0, sizeof(l) );
+        }
+#endif
 
         p_input = vlc_object_find( p_access, VLC_OBJECT_INPUT, FIND_PARENT );
         if( p_input )