[vlc-commits] [Git][videolan/vlc][master] 2 commits: contrib: upnp: Remove unneeded patch

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Fri Aug 5 10:24:08 UTC 2022



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
be9bc069 by Hugo Beauzée-Luyssen at 2022-08-05T09:29:02+00:00
contrib: upnp: Remove unneeded patch

If libupnp is built without --enable-debug, debug is entirely
deactivated.
When debug is enabled, users are required to call UpnpInitLog to enable
logging, otherwise logs are dropped

- - - - -
bf2819fd by Hugo Beauzée-Luyssen at 2022-08-05T09:29:02+00:00
contrib: upnp: Bump to 1.14.13

- - - - -


9 changed files:

- + contrib/src/upnp/0001-ThreadPool-Fix-non-UCRT-builds.patch
- contrib/src/upnp/SHA512SUMS
- contrib/src/upnp/libupnp-win32.patch
- − contrib/src/upnp/libupnp-win64.patch
- − contrib/src/upnp/miniserver-pton-error.patch
- contrib/src/upnp/rules.mak
- − contrib/src/upnp/upnp-no-debugfile.patch
- − contrib/src/upnp/win32-gettimeofday.patch
- contrib/src/upnp/windows-version-inet.patch


Changes:

=====================================
contrib/src/upnp/0001-ThreadPool-Fix-non-UCRT-builds.patch
=====================================
@@ -0,0 +1,32 @@
+From 3560d8d3f1a5b7e88b9d6282c09b2caf37beedc8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo at beauzee.fr>
+Date: Thu, 4 Aug 2022 15:55:55 +0200
+Subject: [PATCH] ThreadPool: Fix non UCRT builds
+
+---
+ upnp/src/threadutil/ThreadPool.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/upnp/src/threadutil/ThreadPool.c b/upnp/src/threadutil/ThreadPool.c
+index 49fa8486..e5883d31 100644
+--- a/upnp/src/threadutil/ThreadPool.c
++++ b/upnp/src/threadutil/ThreadPool.c
+@@ -1297,10 +1297,15 @@ int gettimeofday(struct timeval *tv, struct timezone *tz)
+ 			_tzset();
+ 			tzflag++;
+ 		}
++#ifdef _UCRT
+ 		long itz = 0;
+ 		_get_timezone(&itz);
+ 		tz->tz_minuteswest = (int)(itz / 60);
+ 		_get_daylight(&tz->tz_dsttime);
++#else
++		tz->tz_minuteswest = _timezone / 60;
++		tz->tz_dsttime = _daylight;
++#endif
+ 	}
+ 
+ 	return 0;
+-- 
+2.35.1
+


=====================================
contrib/src/upnp/SHA512SUMS
=====================================
@@ -1 +1 @@
-deb971c6ebaa6a159072cb4153f7ada40400d88faee896366a694d0f15cf1aeea4de1199186122a2968c9e6a92fb7687019601cdbe1f7e08d2962496469a55ea  pupnp-release-1.14.11.tar.gz
+ae6ae72a5e784a0f9508af94c4070627e791660fa37966e9825643fd0f88b171826bda9a2ec872d4961bf3454e5a9cd716127f0bdf6e63c789c4e22aab0b7e71  pupnp-release-1.14.13.tar.gz


=====================================
contrib/src/upnp/libupnp-win32.patch
=====================================
@@ -1,11 +1,13 @@
---- libupnp/upnp/src/inc/upnputil.h	2010-12-23 21:24:06.000000000 +0100
-+++ libupnp.new/upnp/src/inc/upnputil.h	2011-02-13 08:24:24.000000000 +0100
-@@ -125,7 +125,7 @@
- 		#define strncasecmp		strnicmp
- 		#define sleep(a)		Sleep((a)*1000)
- 		#define usleep(a)		Sleep((a)/1000)
--		#define strerror_r(a,b,c)	(strerror_s((b),(c),(a)))
-+		#define strerror_r(a,b,c)       strncpy( b, strerror(a), c)
+diff --git a/upnp/src/inc/upnputil.h b/upnp/src/inc/upnputil.h
+index 2f18422b..ffc79254 100644
+--- a/upnp/src/inc/upnputil.h
++++ b/upnp/src/inc/upnputil.h
+@@ -106,7 +106,7 @@ void linecopylen(
+ 		#endif
+ 		#define sleep(a) Sleep((a)*1000)
+ 		#define usleep(a) Sleep((a) / 1000)
+-		#define strerror_r(a, b, c) (strerror_s((b), (c), (a)))
++		#define strerror_r(a, b, c) strncpy(b, strerror(a), c)
  	#else
- 		#define max(a, b)   (((a)>(b))? (a):(b))
- 		#define min(a, b)   (((a)<(b))? (a):(b))
+ 		#define max(a, b) (((a) > (b)) ? (a) : (b))
+ 		#define min(a, b) (((a) < (b)) ? (a) : (b))


=====================================
contrib/src/upnp/libupnp-win64.patch deleted
=====================================
@@ -1,36 +0,0 @@
-From 9ec9967c55e51c387f7d517e72adb6ed278d153f Mon Sep 17 00:00:00 2001
-From: Alaric Senat <dev.asenat at posteo.net>
-Date: Wed, 10 Mar 2021 15:25:20 +0100
-Subject: win64
-
----
- upnp/inc/upnp.h | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/upnp/inc/upnp.h b/upnp/inc/upnp.h
-index 0a51b34..4711e11 100644
---- a/upnp/inc/upnp.h
-+++ b/upnp/inc/upnp.h
-@@ -61,6 +61,19 @@
- 	/* Other systems ??? */
- #endif
- 
-+#if defined(__MINGW32__)
-+	#if !defined(_OFF_T_)
-+   typedef long long _off_t;
-+   typedef _off_t off_t;
-+		#define _OFF_T_
-+	#else
-+		#ifdef off_t
-+			#undef off_t
-+		#endif
-+		#define off_t long long
-+	#endif
-+#endif
-+
- #ifdef UPNP_ENABLE_OPEN_SSL
- 	#include <openssl/ssl.h>
- #endif
--- 
-2.29.2
-


=====================================
contrib/src/upnp/miniserver-pton-error.patch deleted
=====================================
@@ -1,38 +0,0 @@
-From 06b60ad252d962b21071f157ec0c377c66b2492b Mon Sep 17 00:00:00 2001
-From: Alaric Senat <dev.asenat at posteo.net>
-Date: Thu, 9 Jun 2022 15:19:23 +0200
-Subject: [PATCH] miniserver: Don't initialize sockets for invalid IPs
-
-`init_socket_stuff` was ignoring `inet_pton`'s return value causing
-invalid IPs being seen as valid which caused bad calls to `bind` and
-`listen` further in the code path.
-
-Invalid `bind`s were frequents for interfaces providing only one IP
-protocol version (IPv4 or v6). In those cases, `gIF_IPV4` or `gIF_IPV4`
-were left to their default values (an empty string) causing `inet_pton`
-to fail silently without aborting the socket opening and binding...
-
-Refs #195
----
- upnp/src/genlib/miniserver/miniserver.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/upnp/src/genlib/miniserver/miniserver.c b/upnp/src/genlib/miniserver/miniserver.c
-index 1a313a36..09fe3fbf 100644
---- a/upnp/src/genlib/miniserver/miniserver.c
-+++ b/upnp/src/genlib/miniserver/miniserver.c
-@@ -756,7 +756,10 @@ static int init_socket_suff(
- 		goto error;
- 		break;
- 	}
--	inet_pton(domain, text_addr, addr);
-+
-+	if (inet_pton(domain, text_addr, addr) <= 0)
-+        goto error;
-+
- 	s->fd = socket(domain, SOCK_STREAM, 0);
- 	if (s->fd == INVALID_SOCKET) {
- 		strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
--- 
-2.35.3
-


=====================================
contrib/src/upnp/rules.mak
=====================================
@@ -1,5 +1,5 @@
 # UPNP
-UPNP_VERSION := 1.14.11
+UPNP_VERSION := 1.14.13
 UPNP_URL := $(GITHUB)/pupnp/pupnp/archive/refs/tags/release-$(UPNP_VERSION).tar.gz
 
 ifdef BUILD_NETWORK
@@ -40,9 +40,8 @@ ifdef HAVE_WIN32
 	$(APPLY) $(SRC)/upnp/libupnp-pthread-force.patch
 	$(APPLY) $(SRC)/upnp/libupnp-win32-exports.patch
 	$(APPLY) $(SRC)/upnp/libupnp-win32.patch
-	$(APPLY) $(SRC)/upnp/libupnp-win64.patch
 	$(APPLY) $(SRC)/upnp/windows-version-inet.patch
-	$(APPLY) $(SRC)/upnp/win32-gettimeofday.patch
+	$(APPLY) $(SRC)/upnp/0001-ThreadPool-Fix-non-UCRT-builds.patch
 endif
 ifdef HAVE_LINUX
 ifndef HAVE_ANDROID
@@ -53,8 +52,6 @@ ifdef HAVE_ANDROID
 	$(APPLY) $(SRC)/upnp/revert-ifaddrs.patch
 endif
 	$(APPLY) $(SRC)/upnp/miniserver.patch
-	$(APPLY) $(SRC)/upnp/upnp-no-debugfile.patch
-	$(APPLY) $(SRC)/upnp/miniserver-pton-error.patch
 	$(UPDATE_AUTOCONFIG)
 	$(MOVE)
 


=====================================
contrib/src/upnp/upnp-no-debugfile.patch deleted
=====================================
@@ -1,25 +0,0 @@
-From ef877d8c4991adf4d0615892fee64f6212f850b1 Mon Sep 17 00:00:00 2001
-From: Alaric Senat <dev.asenat at posteo.net>
-Date: Wed, 10 Mar 2021 14:54:00 +0100
-Subject: no-debugfile
-
----
- upnp/src/inc/config.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/upnp/src/inc/config.h b/upnp/src/inc/config.h
-index 8dc8cdb..6f2e17f 100644
---- a/upnp/src/inc/config.h
-+++ b/upnp/src/inc/config.h
-@@ -409,7 +409,7 @@
-  * see <upnp/inc/upnpdebug.h>
-  */
- 
--#define DEBUG_ALL		1
-+#define DEBUG_ALL		0
- #define DEBUG_SSDP		0
- #define DEBUG_SOAP		0
- #define DEBUG_GENA		0
--- 
-2.29.2
-


=====================================
contrib/src/upnp/win32-gettimeofday.patch deleted
=====================================
@@ -1,12 +0,0 @@
---- upnp/upnp/src/threadutil/ThreadPool.h.orig	2022-04-21 15:07:27.194156972 +0300
-+++ upnp/upnp/src/threadutil/ThreadPool.h	2022-04-21 15:07:31.026076222 +0300
-@@ -54,8 +54,8 @@
- 			int  tz_minuteswest; /* minutes W of Greenwich */
- 			int  tz_dsttime;     /* type of dst correction */
- 		};
--		int gettimeofday(struct timeval *tv, struct timezone *tz);
- 	#endif
-+	int gettimeofday(struct timeval *tv, struct timezone *tz);
- #else /* _WIN32 */
- 	#include <sys/param.h>
- 	#include <sys/time.h> /* for gettimeofday() */


=====================================
contrib/src/upnp/windows-version-inet.patch
=====================================
@@ -18,9 +18,9 @@ index f3e08a5..e6233b5 100644
  
 +#include "autoconfig.h"
 +
- #ifdef IPV6_
- #define INET_IPV6
- #endif
+	#ifdef IPV6_
+		#define INET_IPV6
+	#endif
 @@ -13,6 +15,8 @@
  #include <stdio.h>
  #include <string.h>



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/eeb078dd0a2aa1fbb6be97f4ab39fa2835a8347c...bf2819fd0bb212f200821ed33b8e041332b5a4ae

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/eeb078dd0a2aa1fbb6be97f4ab39fa2835a8347c...bf2819fd0bb212f200821ed33b8e041332b5a4ae
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list