[vlc-devel] [PATCH] contrib: libarchive: fix building with Winstore on 8.1

Steve Lhomme robux4 at videolabs.io
Tue Oct 24 13:59:29 CEST 2017


DebugBreak() is not available
---
 contrib/src/libarchive/libarchive-win81.patch | 11 +++++++++++
 contrib/src/libarchive/rules.mak              |  1 +
 2 files changed, 12 insertions(+)
 create mode 100644 contrib/src/libarchive/libarchive-win81.patch

diff --git a/contrib/src/libarchive/libarchive-win81.patch b/contrib/src/libarchive/libarchive-win81.patch
new file mode 100644
index 0000000000..6b4d69d124
--- /dev/null
+++ b/contrib/src/libarchive/libarchive-win81.patch
@@ -0,0 +1,11 @@
+--- libarchive/libarchive/archive_check_magic.c	2015-09-05 06:24:18.000000000 +0200
++++ libarchive/libarchive/archive_check_magic.c.msvc81	2017-10-10 10:37:46.370076600 +0200
+@@ -65,7 +65,7 @@ errmsg(const char *m)
+ static void
+ diediedie(void)
+ {
+-#if defined(_WIN32) && !defined(__CYGWIN__) && defined(_DEBUG)
++#if defined(_WIN32) && !defined(__CYGWIN__) && defined(_DEBUG) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+ 	/* Cause a breakpoint exception  */
+ 	DebugBreak();
+ #endif
diff --git a/contrib/src/libarchive/rules.mak b/contrib/src/libarchive/rules.mak
index c719e170c0..1bbc328899 100644
--- a/contrib/src/libarchive/rules.mak
+++ b/contrib/src/libarchive/rules.mak
@@ -25,6 +25,7 @@ ifdef HAVE_WINSTORE
 	$(APPLY) $(SRC)/libarchive/winrt.patch
 endif
 	$(APPLY) $(SRC)/libarchive/fix-types.patch
+	$(APPLY) $(SRC)/libarchive/libarchive-win81.patch
 	$(call pkg_static,"build/pkgconfig/libarchive.pc.in")
 	$(MOVE)
 
-- 
2.14.2



More information about the vlc-devel mailing list