gst-libs/gst/rtsp/gstrtspconnection.c: Fix build on win32.

Original commit message from CVS:
* gst-libs/gst/rtsp/gstrtspconnection.c:
Fix build on win32.
Patch By: David Schleef <ds@schleef.org>
Fixes: #536874
This commit is contained in:
David Schleef 2008-06-11 20:13:00 +00:00 committed by Jan Schmidt
parent bb595d8fd8
commit 526b2e63a2
2 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2008-06-11 Jan Schmidt <jan.schmidt@sun.com>
* gst-libs/gst/rtsp/gstrtspconnection.c:
Fix build on win32.
Patch By: David Schleef <ds@schleef.org>
Fixes: #536874
2008-06-11 Sebastian Dröge <slomo@circular-chaos.org>
* ext/gio/gstgiobasesrc.c: (gst_gio_base_src_finalize),

View file

@ -76,6 +76,7 @@
#ifdef G_OS_WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#define EINPROGRESS WSAEINPROGRESS
#else
#include <sys/ioctl.h>
@ -97,8 +98,9 @@
#ifdef G_OS_WIN32
#define FIONREAD_TYPE gulong
#define IOCTL_SOCKET ioctlsocket
#define READ_SOCKET(fd, buf, len) recv (fd, buf, len, 0)
#define WRITE_SOCKET(fd, buf, len) send (fd, buf, len, 0)
#define READ_SOCKET(fd, buf, len) recv (fd, (char *)buf, len, 0)
#define WRITE_SOCKET(fd, buf, len) send (fd, (const char *)buf, len, 0)
#define SETSOCKOPT(sock, level, name, val, len) setsockopt (sock, level, name, (const char *)val, len)
#define CLOSE_SOCKET(sock) closesocket (sock)
#define ERRNO_IS_NOT_EAGAIN (WSAGetLastError () != WSAEWOULDBLOCK)
#define ERRNO_IS_NOT_EINTR (WSAGetLastError () != WSAEINTR)
@ -110,6 +112,7 @@
#define IOCTL_SOCKET ioctl
#define READ_SOCKET(fd, buf, len) read (fd, buf, len)
#define WRITE_SOCKET(fd, buf, len) write (fd, buf, len)
#define SETSOCKOPT(sock, level, name, val, len) setsockopt (sock, level, name, val, len)
#define CLOSE_SOCKET(sock) close (sock)
#define ERRNO_IS_NOT_EAGAIN (errno != EAGAIN)
#define ERRNO_IS_NOT_EINTR (errno != EINTR)
@ -1573,12 +1576,12 @@ gst_rtsp_connection_set_qos_dscp (GstRTSPConnection * conn, guint qos_dscp)
switch (af) {
case AF_INET:
if (setsockopt (conn->fd.fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0)
if (SETSOCKOPT (conn->fd.fd, IPPROTO_IP, IP_TOS, &tos, sizeof (tos)) < 0)
goto no_setsockopt;
break;
case AF_INET6:
#ifdef IPV6_TCLASS
if (setsockopt (conn->fd.fd, IPPROTO_IPV6, IPV6_TCLASS, &tos,
if (SETSOCKOPT (conn->fd.fd, IPPROTO_IPV6, IPV6_TCLASS, &tos,
sizeof (tos)) < 0)
goto no_setsockopt;
break;