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"
|
#include "config.h"
|
||||||
#endif
|
#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
|
#define _GNU_SOURCE
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
#ifndef G_OS_WIN32
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "gstudpsrc.h"
|
#include "gstudpsrc.h"
|
||||||
@ -124,6 +124,12 @@
|
|||||||
|
|
||||||
#include <gio/gnetworking.h>
|
#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 */
|
/* Control messages for getting the destination address */
|
||||||
#ifdef IP_PKTINFO
|
#ifdef IP_PKTINFO
|
||||||
GType gst_ip_pktinfo_message_get_type (void);
|
GType gst_ip_pktinfo_message_get_type (void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user