udpsrc: Move #includes around to a) work around broken glibc header and b) Windows
This commit is contained in:
parent
7e47579f17
commit
36a154fa96
@ -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 <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"
|
||||
@ -124,6 +124,12 @@
|
||||
|
||||
#include <gio/gnetworking.h>
|
||||
|
||||
/* 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 <netinet/ip.h>
|
||||
#endif
|
||||
|
||||
/* Control messages for getting the destination address */
|
||||
#ifdef IP_PKTINFO
|
||||
GType gst_ip_pktinfo_message_get_type (void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user