[vlc-devel] [PATCH 4/7] contrib: fix live555 usage on Windows App Store builds
Steve Lhomme
robux4 at gmail.com
Mon Sep 14 14:40:43 CEST 2015
---
contrib/src/live555/rules.mak | 1 +
contrib/src/live555/winstore.patch | 30 ++++++++++++++++++++++++++++++
2 files changed, 31 insertions(+)
create mode 100644 contrib/src/live555/winstore.patch
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..e8315c0
--- /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
+
--
2.5.1
More information about the vlc-devel
mailing list