From 36a154fa96567ac8cc188c2eee745cb15f1bf5cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 28 Jun 2016 15:08:04 +0300 Subject: [PATCH] udpsrc: Move #includes around to a) work around broken glibc header and b) Windows --- gst/udp/gstudpsrc.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c index 7714391..e646878 100644 --- a/gst/udp/gstudpsrc.c +++ b/gst/udp/gstudpsrc.c @@ -107,15 +107,15 @@ #include "config.h" #endif -/* Needed to get struct in6_pktinfo */ +/* Needed to get struct in6_pktinfo. + * Also all these have to be before glib.h is included as + * otherwise struct in6_pktinfo is not defined completely + * due to broken glibc headers */ #define _GNU_SOURCE #include #ifdef HAVE_SYS_SOCKET_H #include #endif -#ifndef G_OS_WIN32 -#include -#endif #include #include "gstudpsrc.h" @@ -124,6 +124,12 @@ #include +/* Required for other parts of in_pktinfo / in6_pktinfo but only + * on non-Windows and can be included after glib.h */ +#ifndef G_OS_WIN32 +#include +#endif + /* Control messages for getting the destination address */ #ifdef IP_PKTINFO GType gst_ip_pktinfo_message_get_type (void); -- 2.7.4