mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
udpsrc: Move #includes around to a) work around broken glibc header and b) Windows
This commit is contained in:
parent
7e47579f17
commit
36a154fa96
1 changed files with 10 additions and 4 deletions
|
@ -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…
Reference in a new issue