]> git.sesse.net Git - vlc/blob - contrib/src/upnp/libupnp-ipv6.patch
contrib/ffmpeg: fixed compilation for the iOS simulator
[vlc] / contrib / src / upnp / libupnp-ipv6.patch
1 From 438ace99538713fb1370411188e0f370069a1818 Mon Sep 17 00:00:00 2001
2 From: Konstantin Pavlov <thresh@videolan.org>
3 Date: Tue, 29 May 2012 10:18:40 +0400
4 Subject: [PATCH] Fix compile under mingw with IPv6 enabled.
5
6 ---
7  upnp/src/genlib/miniserver/miniserver.c |    7 +++++++
8  upnp/src/ssdp/ssdp_server.c             |    7 +++++++
9  2 files changed, 14 insertions(+)
10
11 diff --git a/upnp/src/genlib/miniserver/miniserver.c b/upnp/src/genlib/miniserver/miniserver.c
12 index af310ca..1ae422f 100644
13 --- a/upnp/src/genlib/miniserver/miniserver.c
14 +++ b/upnp/src/genlib/miniserver/miniserver.c
15 @@ -68,6 +68,13 @@
16  /*! . */
17  #define APPLICATION_LISTENING_PORT 49152
18  
19 +/* IPV6_V6ONLY is missing from MinGW, hack taken from
20 + * http://svn.apache.org/repos/asf/apr/apr/trunk/network_io/win32/sockopt.c
21 + */
22 +#ifndef IPV6_V6ONLY
23 +#define IPV6_V6ONLY 27
24 +#endif
25 +
26  struct mserv_request_t {
27         /*! Connection handle. */
28         SOCKET connfd;
29 diff --git a/upnp/src/ssdp/ssdp_server.c b/upnp/src/ssdp/ssdp_server.c
30 index 231c2c5..6a9c27f 100644
31 --- a/upnp/src/ssdp/ssdp_server.c
32 +++ b/upnp/src/ssdp/ssdp_server.c
33 @@ -69,6 +69,13 @@
34         #endif /* UPNP_ENABLE_IPV6 */
35  #endif /* INCLUDE_CLIENT_APIS */
36  
37 +/* IPV6_V6ONLY is missing from MinGW, hack taken from
38 + * http://svn.apache.org/repos/asf/apr/apr/trunk/network_io/win32/sockopt.c
39 + */
40 +#ifndef IPV6_V6ONLY
41 +#define IPV6_V6ONLY 27
42 +#endif
43 +
44  void RequestHandler();
45  
46  enum Listener {
47 -- 
48 1.7.9.7
49