[vlc-devel] [PATCH 1/2] contrib: upnp: Force -lpthread into libupnp.pc

Hugo Beauzée-Luyssen hugo at beauzee.fr
Tue Jan 15 11:50:43 CET 2019


---
 .../src/upnp/libupnp-pthread-w32-force.patch  | 19 +++++++++++++++++++
 contrib/src/upnp/rules.mak                    |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 contrib/src/upnp/libupnp-pthread-w32-force.patch

diff --git a/contrib/src/upnp/libupnp-pthread-w32-force.patch b/contrib/src/upnp/libupnp-pthread-w32-force.patch
new file mode 100644
index 0000000000..56be38747a
--- /dev/null
+++ b/contrib/src/upnp/libupnp-pthread-w32-force.patch
@@ -0,0 +1,19 @@
+--- upnp/configure.ac.pthread-w32      2018-05-17 11:51:47.115502500 +0200
++++ upnp/configure.ac  2018-05-17 12:49:30.371786100 +0200
+@@ -667,6 +667,7 @@ ACX_PTHREAD(
+ #
+ # Update environment variables for pthreads
+ #
++PTHREAD_LIBS="-lpthread"
+ CC="$PTHREAD_CC"
+ CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+@@ -676,7 +677,7 @@ PC_CFLAGS="$PTHREAD_CFLAGS"
+ # WIN32 specific
+ if test "$ac_cv_win32" = "yes"; then
+ WIN32_LIBS="-liphlpapi -lws2_32"
+-PC_CFLAGS="$PC_CFLAGS -DUPNP_STATIC_LIB"
++PC_CFLAGS="$PC_CFLAGS -DUPNP_STATIC_LIB -DPTW32_STATIC_LIB"
+ fi
+ AC_SUBST(PC_CFLAGS)
+ AC_SUBST(WIN32_LIBS)
diff --git a/contrib/src/upnp/rules.mak b/contrib/src/upnp/rules.mak
index a911c1896b..85df0b6ea3 100644
--- a/contrib/src/upnp/rules.mak
+++ b/contrib/src/upnp/rules.mak
@@ -34,6 +34,7 @@ ifdef HAVE_WIN32
 	$(APPLY) $(SRC)/upnp/windows-version-inet.patch
 	$(APPLY) $(SRC)/upnp/libupnp-win32-exports.patch
 	$(APPLY) $(SRC)/upnp/libupnp-pthread-w32-checks.patch
+	$(APPLY) $(SRC)/upnp/libupnp-pthread-w32-force.patch
 ifdef HAVE_WINSTORE
 	$(APPLY) $(SRC)/upnp/no-getifinfo.patch
 endif
-- 
2.20.1



More information about the vlc-devel mailing list