GNOME Bugzilla – Bug 446981
error during the compilation of rtspconnection.c
Last modified: 2007-06-15 08:33:09 UTC
with MinGW, I have those errors: rtspconnection.c: In function `rtsp_connection_connect': rtspconnection.c:214: warning: implicit declaration of function `fcntl' rtspconnection.c:214: error: `F_SETFL' undeclared (first use in this function) rtspconnection.c:214: error: (Each undeclared identifier is reported only once rtspconnection.c:214: error: for each function it appears in.) rtspconnection.c:214: error: `O_NONBLOCK' undeclared (first use in this function) rtspconnection.c:220: error: `EINPROGRESS' undeclared (first use in this function) If I'm not mistaken, that fcntl call (see also lines 139 and 140) can be replaced on windows by: ioctlsocket(fd, FIONBIO, &flags) where flags is declared like that: unsigned long flags; To check the returned value of ioctlsocket : if (ioctlsocket(svr->fd, FIONBIO, &flags) == SOCKET_ERROR) { *** } about line 220, EINPROGRESS is actually WSAEINPROGRESS, defined in winsock2.h. So maybe a #define EINPROGRESS WSAEINPROGRESS just after including winsock2.h is sufficient. If you think that those modifications are correct, I can make a patch
If you make a patch, we can still apply it before the release.
I'll make a first pre-release without it and hope you can have a patch ready in the next few days.
Created attachment 89891 [details] [review] fix MinGW compilation of rtspconnection.c
Looks good, and works for me on Linux. This will work with the VS builds too, right?
yes, it's building with Visual Studio.
Thanks for confirming. Committed: 2007-06-15 Jan Schmidt <thaytan@mad.scientist.com> * gst/rtsp/rtspconnection.c: (rtsp_connection_create), (rtsp_connection_connect): Fix the MingW build. Patch By: Vincent Torri <vtorri at univ-evry dot fr> Fixes: #446981