Contrib: Flac 1.1.4, patch for MingW32 compiling that was broken. Still issues on...
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 17 Feb 2007 04:13:50 +0000 (04:13 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 17 Feb 2007 04:13:50 +0000 (04:13 +0000)
extras/contrib/src/Makefile
extras/contrib/src/Patches/flac-mingw32.patch [new file with mode: 0644]

index 365a864..ea249d4 100644 (file)
@@ -701,6 +701,9 @@ flac-$(FLAC_VERSION).tar.gz:
 
 flac: flac-$(FLAC_VERSION).tar.gz
        $(EXTRACT_GZ)
+ifdef HAVE_WIN32
+       patch -p0 < Patches/flac-mingw32.patch
+endif
 ifneq ($(HOST),$(BUILD))
        (patch -p0 < Patches/flac-cross.patch && cd $@ && autoconf)
 endif
diff --git a/extras/contrib/src/Patches/flac-mingw32.patch b/extras/contrib/src/Patches/flac-mingw32.patch
new file mode 100644 (file)
index 0000000..1fc7bcd
--- /dev/null
@@ -0,0 +1,24 @@
+diff -ruN flac.old/src/libFLAC/bitreader.c flac/src/libFLAC/bitreader.c
+--- flac.old/src/libFLAC/bitreader.c   2007-02-17 04:34:31.000000000 +0100
++++ flac/src/libFLAC/bitreader.c       2007-02-17 04:35:31.000000000 +0100
+@@ -37,6 +37,8 @@
+ #include <string.h> /* for memcpy(), memset() */
+ #if defined(_MSC_VER) && _MSC_VER <= 1200
+ #include <winsock.h> /* for ntohl() */
++#elif defined(__MINGW32__)
++#include <winsock.h> /* for ntohl() */
+ #elif defined FLAC__SYS_DARWIN
+ #include <machine/endian.h> /* for ntohl() */
+ #else
+diff -ruN flac.old/src/libFLAC/bitwriter.c flac/src/libFLAC/bitwriter.c
+--- flac.old/src/libFLAC/bitwriter.c   2007-02-17 04:34:31.000000000 +0100
++++ flac/src/libFLAC/bitwriter.c       2007-02-17 04:35:39.000000000 +0100
+@@ -37,6 +37,8 @@
+ #include <string.h> /* for memcpy(), memset() */
+ #if defined(_MSC_VER) && _MSC_VER <= 1200
+ #include <winsock.h> /* for ntohl() */
++#elif defined(__MINGW32__)
++#include <winsock.h> /* for ntohl() */
+ #elif defined FLAC__SYS_DARWIN
+ #include <machine/endian.h> /* for ntohl() */
+ #else