mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 05:45:58 +00:00
Fix signed when compiling with MSys/MinGW
fix signed issues when compiling with MSys/MinGW. Fixes #572591.
This commit is contained in:
parent
805569c873
commit
4cd4883ed3
2 changed files with 15 additions and 2 deletions
|
@ -126,7 +126,11 @@ gst_net_time_packet_receive (gint fd, struct sockaddr * addr, socklen_t * len)
|
|||
gint ret;
|
||||
|
||||
while (TRUE) {
|
||||
#ifdef G_OS_WIN32
|
||||
ret = recvfrom (fd, (char *) buffer, GST_NET_TIME_PACKET_SIZE,
|
||||
#else
|
||||
ret = recvfrom (fd, buffer, GST_NET_TIME_PACKET_SIZE,
|
||||
#endif
|
||||
0, (struct sockaddr *) addr, len);
|
||||
if (ret < 0) {
|
||||
if (errno != EAGAIN && errno != EINTR)
|
||||
|
@ -197,9 +201,12 @@ gst_net_time_packet_send (const GstNetTimePacket * packet, gint fd,
|
|||
|
||||
#ifdef G_OS_WIN32
|
||||
ioctlsocket (fd, FIONBIO, &flags); /* Set nonblocking mode */
|
||||
#endif
|
||||
|
||||
ret =
|
||||
sendto (fd, (char *) buffer, GST_NET_TIME_PACKET_SIZE, send_flags, addr,
|
||||
len);
|
||||
#else
|
||||
ret = sendto (fd, buffer, GST_NET_TIME_PACKET_SIZE, send_flags, addr, len);
|
||||
#endif
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
fcntl (fd, F_SETFL, fdflags);
|
||||
|
|
|
@ -384,7 +384,13 @@ gst_net_time_provider_start (GstNetTimeProvider * self)
|
|||
goto bind_error;
|
||||
|
||||
len = sizeof (my_addr);
|
||||
#ifdef G_OS_WIN32
|
||||
ret =
|
||||
getsockname (self->priv->sock.fd, (struct sockaddr *) &my_addr,
|
||||
(gint *) & len);
|
||||
#else
|
||||
ret = getsockname (self->priv->sock.fd, (struct sockaddr *) &my_addr, &len);
|
||||
#endif
|
||||
if (ret < 0)
|
||||
goto getsockname_error;
|
||||
|
||||
|
|
Loading…
Reference in a new issue