mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
rtspconnection: Use correct types for some functions on Win32
Fixes bug #573529.
This commit is contained in:
parent
ed013753c0
commit
e5d2d32bba
1 changed files with 11 additions and 0 deletions
|
@ -280,11 +280,18 @@ gst_rtsp_connection_accept (gint sock, GstRTSPConnection ** conn)
|
||||||
GstRTSPConnection *newconn = NULL;
|
GstRTSPConnection *newconn = NULL;
|
||||||
struct sockaddr_in address;
|
struct sockaddr_in address;
|
||||||
GstRTSPUrl *url;
|
GstRTSPUrl *url;
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
|
gulong flags = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
address_len = sizeof (address);
|
address_len = sizeof (address);
|
||||||
memset (&address, 0, address_len);
|
memset (&address, 0, address_len);
|
||||||
|
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
fd = accept (sock, (struct sockaddr *) &address, &address_len);
|
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)
|
if (fd == -1)
|
||||||
goto accept_failed;
|
goto accept_failed;
|
||||||
|
|
||||||
|
@ -427,7 +434,11 @@ gst_rtsp_connection_connect (GstRTSPConnection * conn, GTimeVal * timeout)
|
||||||
/* we can still have an error connecting on windows */
|
/* we can still have an error connecting on windows */
|
||||||
if (gst_poll_fd_has_error (conn->fdset, &conn->fd)) {
|
if (gst_poll_fd_has_error (conn->fdset, &conn->fd)) {
|
||||||
socklen_t len = sizeof (errno);
|
socklen_t len = sizeof (errno);
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
getsockopt (conn->fd.fd, SOL_SOCKET, SO_ERROR, &errno, &len);
|
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;
|
goto sys_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue