[vlc-commits] contrib: fix live555 usage on Windows App Store builds

Steve Lhomme git at videolan.org
Mon Sep 14 16:30:08 CEST 2015


vlc | branch: master | Steve Lhomme <robux4 at gmail.com> | Mon Sep 14 14:40:43 2015 +0200| [5972f5603a671cc6bca10c8e1c31fd243d7dc20e] | committer: Jean-Baptiste Kempf

contrib: fix live555 usage on Windows App Store builds

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 contrib/src/live555/rules.mak      |    1 +
 contrib/src/live555/winstore.patch |   30 ++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/contrib/src/live555/rules.mak b/contrib/src/live555/rules.mak
index 7830c41..d262e79 100644
--- a/contrib/src/live555/rules.mak
+++ b/contrib/src/live555/rules.mak
@@ -53,6 +53,7 @@ live555: $(LIVE555_FILE) .sum-live555
 ifdef HAVE_ANDROID
 	cd live && sed -e 's%-DPIC%-DPIC -DNO_SSTREAM=1 -DLOCALE_NOT_USED -I$(ANDROID_NDK)/platforms/$(ANDROID_API)/arch-$(PLATFORM_SHORT_ARCH)/usr/include%' -i.orig config.linux
 endif
+	cd live && patch -lfp1 < ../../src/live555/winstore.patch
 	mv live $@
 	touch $@
 
diff --git a/contrib/src/live555/winstore.patch b/contrib/src/live555/winstore.patch
new file mode 100644
index 0000000..7723e3b
--- /dev/null
+++ b/contrib/src/live555/winstore.patch
@@ -0,0 +1,30 @@
+--- a/liveMedia/include/InputFile.hh      2015-06-24 16:32:45.000000000 +0200
++++ b/liveMedia/include/InputFile.hh   2015-08-04 10:12:13.791494000 +0200
+@@ -50,6 +50,7 @@
+
+ void CloseInputFile(FILE* fid);
+
++#undef GetFileSize
+ u_int64_t GetFileSize(char const* fileName, FILE* fid);
+     // 0 means zero-length, unbounded, or unknown
+
+
+--- a/BasicUsageEnvironment/BasicUsageEnvironment0.cpp    2015-06-24 16:32:45.000000000 +0200
++++ b/BasicUsageEnvironment/BasicUsageEnvironment0.cpp 2015-08-04 10:22:41.067003200 +0200
+@@ -68,6 +68,7 @@
+
+   if (err == 0) err = getErrno();
+ #if defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_WCE)
++#ifndef _UNICODE
+   char errMsg[RESULT_MSG_BUFFER_MAX] = "\0";
+   if (0 != FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, errMsg, sizeof(errMsg)/sizeof(errMsg[0]), NULL)) {
+     // Remove all trailing '\r', '\n' and '.'
+@@ -77,6 +78,7 @@
+   } else
+     snprintf(errMsg, sizeof(errMsg)/sizeof(errMsg[0]), "error %d", err);
+   appendToResultMsg(errMsg);
++#endif
+ #else
+   appendToResultMsg(strerror(err));
+ #endif
+



More information about the vlc-commits mailing list