Re: rtsp.c SVN 27243 MingW socket.h or winsock2.h
Gianluigi Tiesi <[email protected]> Tue, 15 Jul 2008 22:26:22 +0200
| Newsgroups | gmane.comp.video.mplayer.cygwin |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jul 09, 2008 at 10:22:45PM -0400, Henry Garcia wrote: > Had to comment out the following in rtsp.c to get MingW to compile SVN 27243 > > > #include <sys/socket.h> > > Apparently, MingW needs winsock2.h and not socket.h. Not too familiar with > the > 'if' logic in c programming, but shouldn't including the socket headers > file be left out if > HAVE_WINSOCK2 is defined. Seems like the logical thing to do. > > Few more chapters in my C tutorial and I should have come up with a better > solution > other than commenting out the #include <sys/socket.h> line. hi, try the attached patch Regards -- Gianluigi Tiesi <[email protected]> EDP Project Leader Netfarm S.r.l. - http://www.netfarm.it/ Free Software: http://oss.netfarm.it/ _______________________________________________ MPlayer-cygwin mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/mplayer-cygwin
xx_fixinc.diff
(text/plain, 479 B)
diff -NpuBr -Xexclude.txt main/stream/librtsp/rtsp.c sherpya/stream/librtsp/rtsp.c --- main/stream/librtsp/rtsp.c 2008-07-10 19:30:22.546875000 +0200 +++ sherpya/stream/librtsp/rtsp.c 2008-07-15 21:59:24.703125000 +0200 @@ -41,10 +41,11 @@ #include <time.h> #include <sys/time.h> #include <sys/types.h> -#include <sys/socket.h> #include <inttypes.h> #ifdef HAVE_WINSOCK2 #include <winsock2.h> +#else +#include <sys/socket.h> #endif #include "mp_msg.h" #include "rtsp.h"