diff options
author | jstebbins <[email protected]> | 2013-01-26 18:47:13 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2013-01-26 18:47:13 +0000 |
commit | 8feea17105d6df8114447d66028673920abc548b (patch) | |
tree | db5bcd29396493269e469269007ef5390a45b5a8 /contrib/libdvdread | |
parent | ba0fe8ce2fd21992bbd26fc17bddc406eceb04f4 (diff) |
build: Fix mingw crashes in libdvdread when using gcc >= 4.7
mingw gcc >= 4.7 now packs structures in a "MS compatible" fashion.
This breaks the normal expected behavior of packed structures. To restore
the correct behavior, the option -mno-ms-bitfields must be added :-\
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5208 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib/libdvdread')
-rw-r--r-- | contrib/libdvdread/P01-mingw-bitfields.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/libdvdread/P01-mingw-bitfields.patch b/contrib/libdvdread/P01-mingw-bitfields.patch new file mode 100644 index 000000000..ae852134a --- /dev/null +++ b/contrib/libdvdread/P01-mingw-bitfields.patch @@ -0,0 +1,19 @@ +diff -Naur libdvdread.orig/configure.ac libdvdread/configure.ac +--- libdvdread.orig/configure.ac 2009-01-08 14:57:10.000000000 -0800 ++++ libdvdread/configure.ac 2013-01-26 10:35:21.366836184 -0800 +@@ -141,6 +141,15 @@ + *mingw32*) + CFLAGS="-idirafter \$(top_srcdir)/msvc/include $CFLAGS" + LDFLAGS="-no-undefined $LDFLAGS" ++ if test "$GCC" = "yes" ; then ++ gcc_version="`$CC -dumpversion`" ++ gcc_version_major=$(echo $gcc_version | cut -d"." -f1) ++ gcc_version_minor=$(echo $gcc_version | cut -d"." -f2) ++ gcc_version_patch=$(echo $gcc_version | cut -d"." -f3) ++ if test $gcc_version_major -ge 4 -a $gcc_version_minor -ge 7 ; then ++ CFLAGS="-mno-ms-bitfields $CFLAGS" ++ fi ++ fi + ;; + *cygwin*) + LDFLAGS="-no-undefined $LDFLAGS" |