From 044f6297840f4d774312ef1d924c4544450d2d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 2 Feb 2008 06:52:41 +0000 Subject: [PATCH] gst-libs/gst/rtsp/gstrtspconnection.c: Cast glong to time_t as time_t might have a different type on other platforms,... Original commit message from CVS: * gst-libs/gst/rtsp/gstrtspconnection.c: (add_date_header): Cast glong to time_t as time_t might have a different type on other platforms, like FreeBSD, and we get a compiler warning otherwise. Fixes bug #511825. --- ChangeLog | 7 +++++++ gst-libs/gst/rtsp/gstrtspconnection.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f55edcee37..98adc93a92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-02-02 Sebastian Dröge + + * gst-libs/gst/rtsp/gstrtspconnection.c: (add_date_header): + Cast glong to time_t as time_t might have a different type on + other platforms, like FreeBSD, and we get a compiler warning + otherwise. Fixes bug #511825. + 2008-02-01 Wim Taymans * gst/playback/gstplaybin2.c: (gst_play_bin_class_init), diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index 48ffda237a..9da13fa31b 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -368,10 +368,12 @@ add_date_header (GstRTSPMessage * message) { GTimeVal tv; gchar date_string[100]; + time_t t; g_get_current_time (&tv); + t = (time_t) tv.tv_sec; strftime (date_string, sizeof (date_string), "%a, %d %b %Y %H:%M:%S GMT", - gmtime (&tv.tv_sec)); + gmtime (&t)); gst_rtsp_message_add_header (message, GST_RTSP_HDR_DATE, date_string); }