[vlc-commits] contrib: gcrypt: fix getpid usage in winstore builds
Steve Lhomme
git at videolan.org
Mon May 18 16:19:12 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Apr 30 15:17:43 2020 +0200| [bc123afaba142bc07617a35ee31ab679a933e75a] | committer: Steve Lhomme
contrib: gcrypt: fix getpid usage in winstore builds
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bc123afaba142bc07617a35ee31ab679a933e75a
---
...ide-a-getpid-replacement-that-works-on-Wi.patch | 30 ++++++++++++++++++++++
contrib/src/gcrypt/rules.mak | 1 +
2 files changed, 31 insertions(+)
diff --git a/contrib/src/gcrypt/0001-compat-provide-a-getpid-replacement-that-works-on-Wi.patch b/contrib/src/gcrypt/0001-compat-provide-a-getpid-replacement-that-works-on-Wi.patch
new file mode 100644
index 0000000000..fd19010a54
--- /dev/null
+++ b/contrib/src/gcrypt/0001-compat-provide-a-getpid-replacement-that-works-on-Wi.patch
@@ -0,0 +1,30 @@
+From 838958b93cea04466bb4d745e62b54f9dad595b6 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Thu, 30 Apr 2020 15:15:51 +0200
+Subject: [PATCH] compat: provide a getpid replacement that works on Windows
+ XP+
+
+GetCurrentProcessId() is available since Windows XP
+
+getpid() is not allowed in UCRT builds.
+https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps
+---
+ compat/getpid.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/compat/getpid.c b/compat/getpid.c
+index 032387c3..eb0a4899 100644
+--- a/compat/getpid.c
++++ b/compat/getpid.c
+@@ -14,7 +14,7 @@
+ #include <config.h>
+ #endif
+
+-#ifdef HAVE_W32CE_SYSTEM
++#ifdef _WIN32
+ #include <windows.h>
+ #include <sys/types.h>
+
+--
+2.26.0.windows.1
+
diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak
index a92790fe7f..625ff30d71 100644
--- a/contrib/src/gcrypt/rules.mak
+++ b/contrib/src/gcrypt/rules.mak
@@ -18,6 +18,7 @@ gcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt
$(APPLY) $(SRC)/gcrypt/fix-pthread-detection.patch
$(APPLY) $(SRC)/gcrypt/0001-random-Don-t-assume-that-_WIN64-implies-x86_64.patch
$(APPLY) $(SRC)/gcrypt/0002-aarch64-mpi-Fix-building-the-mpi-aarch64-assembly-fo.patch
+ $(APPLY) $(SRC)/gcrypt/0001-compat-provide-a-getpid-replacement-that-works-on-Wi.patch
ifdef HAVE_WINSTORE
$(APPLY) $(SRC)/gcrypt/winrt.patch
endif
More information about the vlc-commits
mailing list