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).
+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),
2006-04-11 Wim Taymans <wim@fluendo.com>
* gst/gstelementfactory.c: (gst_element_register),
#include "config.h"
#endif
#include "config.h"
#endif
+#ifdef __CYGWIN__
+# include <unistd.h>
+# include <fcntl.h>
+#endif
+
#include "gstnettimepacket.h"
#include "gstnettimepacket.h"
gst_net_time_packet_send (const GstNetTimePacket * packet, gint fd,
struct sockaddr * addr, socklen_t len)
{
gst_net_time_packet_send (const GstNetTimePacket * packet, gint fd,
struct sockaddr * addr, socklen_t len)
{
+#ifdef __CYGWIN__
+ gint fdflags;
+#endif
g_return_val_if_fail (packet != NULL, -EINVAL);
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);
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