udpsrc: Fix compilation on Windows and *BSD/OSX
authorSebastian Dröge <sebastian@centricular.com>
Tue, 28 Jun 2016 11:25:03 +0000 (14:25 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 28 Jun 2016 11:25:03 +0000 (14:25 +0300)
gst/udp/gstudpsrc.c

index f2ccca4..7714391 100644 (file)
 /* Needed to get struct in6_pktinfo */
 #define _GNU_SOURCE
 #include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif
+#ifndef G_OS_WIN32
 #include <netinet/in.h>
+#endif
 
 #include <string.h>
 #include "gstudpsrc.h"
@@ -363,7 +367,7 @@ gst_ip_recvdstaddr_message_deserialize (gint level,
   addr = data;
 
   message = g_object_new (GST_TYPE_IP_RECVDSTADDR_MESSAGE, NULL);
-  message->addr = g_inet_address_new_from_bytes ((guint8 *) addr, AF_INET);
+  message->addr = *addr;
 
   return G_SOCKET_CONTROL_MESSAGE (message);
 }