GNOME Bugzilla – Bug 511825
[RTSP] compiler warning on FreeBSD
Last modified: 2008-02-02 10:28:58 UTC
Compiling gst-libs/gst/rtsp/gstrtspconnection.c on FreeBSD currently gives, with latest CVS, the following compiler warning. Patch below fixes it. gstrtspconnection.c: In function `add_date_header': gstrtspconnection.c:374: warning: passing arg 1 of `gmtime' from incompatible pointer type diff -a -u -p -r1.8 gstrtspconnection.c --- gst-libs/gst/rtsp/gstrtspconnection.c 16 Dec 2007 23:52:58 -0000 1.8 +++ gst-libs/gst/rtsp/gstrtspconnection.c 24 Jan 2008 16:29:29 -0000 @@ -371,7 +371,7 @@ add_date_header (GstRTSPMessage * messag g_get_current_time (&tv); strftime (date_string, sizeof (date_string), "%a, %d %b %Y %H:%M:%S GMT", - gmtime (&tv.tv_sec)); + gmtime ((time_t *) &tv.tv_sec)); gst_rtsp_message_add_header (message, GST_RTSP_HDR_DATE, date_string); }
Should be committed after freeze...
Committed... 2008-01-29 Sebastian Dröge <slomo@circular-chaos.org> * 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.