mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-27 03:23:16 +00:00
libs/gst/net/gstnettimepacket.c: MSG_DONTWAIT is not defined on Cygwin, so work around that (fixes #317048).
Original commit message from CVS: * libs/gst/net/gstnettimepacket.c: (gst_net_time_packet_send): MSG_DONTWAIT is not defined on Cygwin, so work around that (fixes #317048).
This commit is contained in:
parent
001890e6b2
commit
7916e14a25
2 changed files with 28 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-04-11 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* libs/gst/net/gstnettimepacket.c: (gst_net_time_packet_send):
|
||||
MSG_DONTWAIT is not defined on Cygwin, so work
|
||||
around that (fixes #317048).
|
||||
|
||||
2006-04-11 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/gstelementfactory.c: (gst_element_register),
|
||||
|
|
|
@ -32,6 +32,11 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
# include <unistd.h>
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#include "gstnettimepacket.h"
|
||||
|
||||
|
||||
|
@ -164,14 +169,29 @@ gint
|
|||
gst_net_time_packet_send (const GstNetTimePacket * packet, gint fd,
|
||||
struct sockaddr * addr, socklen_t len)
|
||||
{
|
||||
#ifdef __CYGWIN__
|
||||
gint fdflags;
|
||||
#endif
|
||||
guint8 *buffer;
|
||||
gint ret;
|
||||
gint ret, send_flags;
|
||||
|
||||
g_return_val_if_fail (packet != NULL, -EINVAL);
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
send_flags = 0;
|
||||
fdflags = fcntl (fd, F_GETFL);
|
||||
fcntl (fd, F_SETFL, fdflags | O_NONBLOCK);
|
||||
#else
|
||||
send_flags = MSG_DONTWAIT;
|
||||
#endif
|
||||
|
||||
buffer = gst_net_time_packet_serialize (packet);
|
||||
|
||||
ret = sendto (fd, buffer, GST_NET_TIME_PACKET_SIZE, MSG_DONTWAIT, addr, len);
|
||||
ret = sendto (fd, buffer, GST_NET_TIME_PACKET_SIZE, send_flags, addr, len);
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
fcntl (fd, F_SETFL, fdflags);
|
||||
#endif
|
||||
|
||||
g_free (buffer);
|
||||
|
||||
|
|
Loading…
Reference in a new issue