From: LRN Date: Sat, 28 Feb 2009 18:35:33 +0000 (+0100) Subject: rtspconnection: Use correct types for some functions on Win32 X-Git-Tag: RELEASE-0.10.23~222 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5d2d32bbaf6bf4541ad69e3730bd721f431a1e9;p=platform%2Fupstream%2Fgst-plugins-base.git rtspconnection: Use correct types for some functions on Win32 Fixes bug #573529. --- diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c index d45567c..d5b61ae 100644 --- a/gst-libs/gst/rtsp/gstrtspconnection.c +++ b/gst-libs/gst/rtsp/gstrtspconnection.c @@ -280,11 +280,18 @@ gst_rtsp_connection_accept (gint sock, GstRTSPConnection ** conn) GstRTSPConnection *newconn = NULL; struct sockaddr_in address; GstRTSPUrl *url; +#ifdef G_OS_WIN32 + gulong flags = 1; +#endif address_len = sizeof (address); memset (&address, 0, address_len); +#ifndef G_OS_WIN32 fd = accept (sock, (struct sockaddr *) &address, &address_len); +#else + fd = accept (sock, (struct sockaddr *) &address, (gint *) & address_len); +#endif /* G_OS_WIN32 */ if (fd == -1) goto accept_failed; @@ -427,7 +434,11 @@ gst_rtsp_connection_connect (GstRTSPConnection * conn, GTimeVal * timeout) /* we can still have an error connecting on windows */ if (gst_poll_fd_has_error (conn->fdset, &conn->fd)) { socklen_t len = sizeof (errno); +#ifndef G_OS_WIN32 getsockopt (conn->fd.fd, SOL_SOCKET, SO_ERROR, &errno, &len); +#else + getsockopt (conn->fd.fd, SOL_SOCKET, SO_ERROR, (char *) &errno, &len); +#endif goto sys_error; }