[vlc-commits] Contribs: upnp: Don't compile inet_pton.* on winrt

Jean-Baptiste Kempf git at videolan.org
Tue May 10 13:56:34 CEST 2016


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon May  9 20:48:48 2016 +0200| [5d3f652e57474238238ddec8337d08edeae47ee7] | committer: Hugo Beauzée-Luyssen

Contribs: upnp: Don't compile inet_pton.* on winrt

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5d3f652e57474238238ddec8337d08edeae47ee7
---

 contrib/src/upnp/rules.mak        |    2 +-
 contrib/src/upnp/winrt-inet.patch |   36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/contrib/src/upnp/rules.mak b/contrib/src/upnp/rules.mak
index c56ed8c..36f59e7 100644
--- a/contrib/src/upnp/rules.mak
+++ b/contrib/src/upnp/rules.mak
@@ -28,9 +28,9 @@ ifdef HAVE_WIN32
 	$(APPLY) $(SRC)/upnp/libupnp-win32.patch
 	$(APPLY) $(SRC)/upnp/libupnp-win64.patch
 	$(APPLY) $(SRC)/upnp/windows-random.patch
-	$(APPLY) $(SRC)/upnp/no-getifinfo.patch
 ifdef HAVE_WINRT
 	$(APPLY) $(SRC)/upnp/winrt-dont-force-win32-winnt.patch
+	$(APPLY) $(SRC)/upnp/no-getifinfo.patch
 endif
 endif
 	$(APPLY) $(SRC)/upnp/libupnp-ipv6.patch
diff --git a/contrib/src/upnp/winrt-inet.patch b/contrib/src/upnp/winrt-inet.patch
new file mode 100644
index 0000000..32003bb
--- /dev/null
+++ b/contrib/src/upnp/winrt-inet.patch
@@ -0,0 +1,36 @@
+--- upnp/upnp/Makefile.am	2013-11-15 17:01:35.000000000 +0100
++++ upnp.new/upnp/Makefile.am	2016-05-09 19:16:43.909558923 +0200
+@@ -148,9 +148,9 @@
+ 
+ 
+ # inet_pton (needed on Win32, compiles to nothing elsewhere)
+-libupnp_la_SOURCES += \
+-	src/inet_pton.c \
+-	src/inc/inet_pton.h
++#libupnp_la_SOURCES += \
++#	src/inet_pton.c \
++#	src/inc/inet_pton.h
+ 
+ 
+ # check / distcheck tests
+diff -ruN upnp.new/upnp/src/inc/inet_pton.h upnp/upnp/src/inc/inet_pton.h
+--- upnp.new/upnp/src/inc/inet_pton.h	2010-12-23 21:24:06.000000000 +0100
++++ upnp/upnp/src/inc/inet_pton.h	2016-05-09 20:25:37.765374740 +0200
+@@ -31,6 +31,11 @@
+  * \return
+  *	pointer to presentation format address (`dst'), or NULL (see errno).
+  */
++#define inet_ntop InetNtopA
++
++#define inet_pton InetPtonA
++
++#if 0
+ extern const char *inet_ntop(int af, const void *src, char *dst,
+ 			     socklen_t size);
+ 
+@@ -47,4 +52,5 @@
+ 
+ #endif /* WIN32 */
+ 
++#endif
+ #endif /* INET_PTON */



More information about the vlc-commits mailing list