vlc/vlc-3.0 | branch: master | Martin Storsjö <[email protected]> | Thu Dec 14 
23:42:21 2017 +0200| [ad75f9e82964a7ec9dfa3b26e50d18d097ebf653] | committer: 
Hugo Beauzée-Luyssen

contrib: flac: Don't force __MSVCRT_VERSION__ to a specific (old) version

The forcing of this define was added upstream many years ago, probably
to expose certain features that aren't available by default in the old
mingw.org headers. In mingw-w64, setting __MSVCRT_VERSION__ doesn't
expose much new functionality at all (contrary to in mingw.org), and
the default in mingw-w64 is 0x0700.

Therefore, since we're using mingw-w64 anyway, don't force this version
but just use whatever the toolchain default is, assuming the default
is new enough.

This fixes building with mingw-w64 with the default msvcrt set to
ucrtbase.

(cherry picked from commit 44736e0a50738ece67d154f1c338b1389c2064b1)
Signed-off-by: Hugo Beauzée-Luyssen <[email protected]>

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

 contrib/src/flac/dont-force-msvcrt-version.patch | 11 +++++++++++
 contrib/src/flac/rules.mak                       |  1 +
 2 files changed, 12 insertions(+)

diff --git a/contrib/src/flac/dont-force-msvcrt-version.patch 
b/contrib/src/flac/dont-force-msvcrt-version.patch
new file mode 100644
index 0000000000..b233bd3b61
--- /dev/null
+++ b/contrib/src/flac/dont-force-msvcrt-version.patch
@@ -0,0 +1,11 @@
+diff -urN flac-orig/configure.ac flac/configure.ac
+--- flac-orig/configure.ac     2017-01-01 03:46:35.224989057 +0200
++++ flac/configure.ac  2018-02-26 00:37:22.876134887 +0200
+@@ -178,7 +178,6 @@
+ os_is_windows=no
+ case "$host" in
+       *-*-cygwin|*mingw*)
+-              CPPFLAGS="-D__MSVCRT_VERSION__=0x0601 $CPPFLAGS"
+               os_is_windows=yes
+               ;;
+ esac
diff --git a/contrib/src/flac/rules.mak b/contrib/src/flac/rules.mak
index c48a609d19..1251ff3f99 100644
--- a/contrib/src/flac/rules.mak
+++ b/contrib/src/flac/rules.mak
@@ -30,6 +30,7 @@ ifeq ($(ANDROID_ABI), x86)
        cd $(UNPACK_DIR) && sed -i.orig -e s/"#  undef 
USE_OBSOLETE_SIGCONTEXT_FLAVOR"/"#define USE_OBSOLETE_SIGCONTEXT_FLAVOR"/g 
src/libFLAC/cpu.c
 endif
 endif
+       $(APPLY) $(SRC)/flac/dont-force-msvcrt-version.patch
        $(call pkg_static,"src/libFLAC/flac.pc.in")
        $(UPDATE_AUTOCONFIG)
        $(MOVE)

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to