[vlc-commits] contrib: libdsm: Don't use _pipe on winstore

Hugo Beauzée-Luyssen git at videolan.org
Mon Dec 3 15:13:28 CET 2018


vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Dec  3 14:19:40 2018 +0100| [d8ab4cbd7fc8b7ee8fba456aa71ffebf851f50e0] | committer: Hugo Beauzée-Luyssen

contrib: libdsm: Don't use _pipe on winstore

(cherry picked from commit 82faba6e5ecbd7d3159820ef4ab71dc8083ea8dc)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 ...on-t-use-_pipe-when-building-for-winstore.patch | 37 ++++++++++++++++++++++
 contrib/src/libdsm/rules.mak                       |  1 +
 2 files changed, 38 insertions(+)

diff --git a/contrib/src/libdsm/0001-compat-Don-t-use-_pipe-when-building-for-winstore.patch b/contrib/src/libdsm/0001-compat-Don-t-use-_pipe-when-building-for-winstore.patch
new file mode 100644
index 0000000000..6df9ce8a1b
--- /dev/null
+++ b/contrib/src/libdsm/0001-compat-Don-t-use-_pipe-when-building-for-winstore.patch
@@ -0,0 +1,37 @@
+From 45e48b777207853d7b125612b40b5d8fde101634 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo at beauzee.fr>
+Date: Mon, 3 Dec 2018 14:13:26 +0100
+Subject: [PATCH] compat: Don't use _pipe when building for winstore
+
+---
+ compat/compat.h | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/compat/compat.h b/compat/compat.h
+index 4eef355..b7f878c 100644
+--- a/compat/compat.h
++++ b/compat/compat.h
+@@ -66,13 +66,18 @@ char *strndup(const char *str, size_t n);
+ #endif
+ 
+ #if !defined(HAVE_PIPE) && defined(HAVE__PIPE)
+-#include <fcntl.h>
+-#define HAVE_PIPE
++# ifdef _WIN32
++#  include <winapifamily.h>
++# endif
++# if !defined(_WIN32) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
++#  include <fcntl.h>
++#  define HAVE_PIPE
+ static inline int pipe(int fds[2])
+ {
+     return _pipe(fds, 32768, O_NOINHERIT | O_BINARY);
+ }
+ #endif
++#endif
+ 
+ #ifndef _WIN32
+ #define closesocket(fd) close(fd)
+-- 
+2.19.2
+
diff --git a/contrib/src/libdsm/rules.mak b/contrib/src/libdsm/rules.mak
index 79a235333f..f5235be43f 100644
--- a/contrib/src/libdsm/rules.mak
+++ b/contrib/src/libdsm/rules.mak
@@ -23,6 +23,7 @@ libdsm: libdsm-$(LIBDSM_VERSION).tar.gz .sum-libdsm
 	$(APPLY) $(SRC)/libdsm/0001-build-fix-nl_langinfo-detection-on-Android.patch
 	$(APPLY) $(SRC)/libdsm/fix-pc-generation.patch
 	$(APPLY) $(SRC)/libdsm/fix-pipe-compat.patch
+	$(APPLY) $(SRC)/libdsm/0001-compat-Don-t-use-_pipe-when-building-for-winstore.patch
 	$(MOVE)
 
 DEPS_libdsm = libtasn1 iconv



More information about the vlc-commits mailing list