GNOME Bugzilla – Bug 393427
error/warnings when compiling with mingw
Last modified: 2007-01-08 12:46:01 UTC
rtsp plugin: rtspconnection.c:53:23: sys/ioctl.h: No such file or directory rtspconnection.c: In function `rtsp_connection_read': rtspconnection.c:504: warning: implicit declaration of function `ioctl' winsock2.h declares ioctlsocket (third arg is an ulong, not an int). I've attached a patch below. rtspdefs.c:47:19: netdb.h: No such file or directory rtspdefs.c: In function `rtsp_strresult': rtspdefs.c:215: warning: implicit declaration of function `hstrerror' I don't know what I should do, here. note that netdb.h is not needed on mingw. Is it for Linux ? udp plugin: gstudpsrc.c: In function `gst_udpsrc_create': gstudpsrc.c:423: warning: int format, gulong arg (arg 8) gstudpsrc.c:450: warning: int format, gulong arg (arg 8) A fix is in the patch below. jpeg plugin: gstjpegenc.c: In function `gst_jpegenc_init': gstjpegenc.c:235: warning: assignment from incompatible pointer type gstjpegdec.c: In function `gst_jpeg_dec_init': gstjpegdec.c:305: warning: assignment from incompatible pointer type gstjpegdec.c:307: warning: assignment from incompatible pointer type smokecodec.c: In function `smokecodec_encode_new': smokecodec.c:176: warning: assignment from incompatible pointer type smokecodec.c:187: warning: assignment from incompatible pointer type smokecodec.c:189: warning: assignment from incompatible pointer type These warnings come from jconfig.h: on Windows, a boolean is a unsigned char. A fix is in the patch below
Created attachment 79515 [details] [review] patch for the compilation of gst-plugins-good with MinGW
netdb is needed... for hstrerror :)
Cool, thanks for the patch. May I suggest the following changes though? :) - if the libjpeg header file says 'boolean', then the functions should probably return boolean on all systems, not only on win32 (and even if different types were required it would be nicer to use a define or typedef IMHO) - please don't put #ifdef around GST_LOG statements for int vs long, just pick one of %ld or %d and add a cast - the printf format for gulong is %lu not %lud
Created attachment 79523 [details] [review] new patch - The functions return boolean. You're right. Done - Done (cast to an int) - My 'suppr' key does not work well :)
Thanks, applied: 2007-01-08 Tim-Philipp Müller <tim at centricular dot net> Patch by: Vincent Torri <vtorri at univ-evry fr> * ext/jpeg/gstjpegdec.c: * ext/jpeg/gstjpegenc.c: * ext/jpeg/smokecodec.c: These libjpeg callbacks should return a 'boolean' (unsigned char apparently) and not a 'gboolean' (which maps to gint). Fixes warnings when compiling with MingW. * gst/rtsp/rtspconnection.c: (rtsp_connection_read): Use ioctlsocket on win32. * gst/udp/gstudpsrc.c: (gst_udpsrc_create): Some printf format fixes for win32.