[FFmpeg-cvslog] network: Pass pointers of the right type to get/setsockopt/ ioctlsocket on windows
Martin Storsjö
git at videolan.org
Wed Jun 20 21:25:28 CEST 2012
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Mon Jun 18 23:39:30 2012 +0300| [561687696f8a8764cabc64a482a2b72afc9d4a33] | committer: Martin Storsjö
network: Pass pointers of the right type to get/setsockopt/ioctlsocket on windows
This avoids warnings.
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=561687696f8a8764cabc64a482a2b72afc9d4a33
---
libavformat/network.h | 2 ++
libavformat/os_support.c | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavformat/network.h b/libavformat/network.h
index 72d01d2..1dc9deb 100644
--- a/libavformat/network.h
+++ b/libavformat/network.h
@@ -35,6 +35,8 @@
#define ETIMEDOUT WSAETIMEDOUT
#define ECONNREFUSED WSAECONNREFUSED
#define EINPROGRESS WSAEINPROGRESS
+#define getsockopt(a, b, c, d, e) getsockopt(a, b, c, (char*) d, e)
+#define setsockopt(a, b, c, d, e) setsockopt(a, b, c, (const char*) d, e)
int ff_neterrno(void);
#else
diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index 889a005..4181350 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -252,7 +252,8 @@ const char *ff_gai_strerror(int ecode)
int ff_socket_nonblock(int socket, int enable)
{
#if HAVE_WINSOCK2_H
- return ioctlsocket(socket, FIONBIO, &enable);
+ u_long param = enable;
+ return ioctlsocket(socket, FIONBIO, ¶m);
#else
if (enable)
return fcntl(socket, F_SETFL, fcntl(socket, F_GETFL) | O_NONBLOCK);
More information about the ffmpeg-cvslog
mailing list