Codebase list libsdl2-mixer / debian/2.0.0_rc1-1 external / flac-1.2.1.patch
debian/2.0.0_rc1-1

Tree @debian/2.0.0_rc1-1 (Download .tar.gz)

flac-1.2.1.patch @debian/2.0.0_rc1-1raw · history · blame

diff -ruN flac-1.2.1/configure flac-1.2.1.new/configure
--- flac-1.2.1/configure	2007-09-16 13:05:33.000000000 -0700
+++ flac-1.2.1.new/configure	2013-05-29 22:59:33.000000000 -0700
@@ -6845,7 +6845,8 @@
       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
       # as there is no search path for DLLs.
       hardcode_libdir_flag_spec='-L$libdir'
-      allow_undefined_flag=unsupported
+      # The FLAC build trips the undefined symbols path for some reason, even though it links successfully.
+      #allow_undefined_flag=unsupported
       always_export_symbols=no
       enable_shared_with_static_runtimes=yes
       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
diff -ruN flac-1.2.1/examples/cpp/encode/file/main.cpp flac-1.2.1.new/examples/cpp/encode/file/main.cpp
--- flac-1.2.1/examples/cpp/encode/file/main.cpp	2007-09-13 08:58:03.000000000 -0700
+++ flac-1.2.1.new/examples/cpp/encode/file/main.cpp	2013-05-29 22:59:33.000000000 -0700
@@ -30,6 +30,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include "FLAC++/metadata.h"
 #include "FLAC++/encoder.h"
 
diff -ruN flac-1.2.1/src/libFLAC/bitreader.c flac-1.2.1.new/src/libFLAC/bitreader.c
--- flac-1.2.1/src/libFLAC/bitreader.c	2007-09-10 21:48:55.000000000 -0700
+++ flac-1.2.1.new/src/libFLAC/bitreader.c	2013-05-29 22:59:33.000000000 -0700
@@ -40,7 +40,12 @@
 #elif defined FLAC__SYS_DARWIN
 #include <machine/endian.h> /* for ntohl() */
 #elif defined __MINGW32__
-#include <winsock.h> /* for ntohl() */
+//#include <winsock.h> /* for ntohl() */
+static inline unsigned int ntohl(unsigned int x)
+{
+    __asm__("bswap %0": "=r"(x):"0"(x));
+    return x;
+}
 #else
 #include <netinet/in.h> /* for ntohl() */
 #endif
diff -ruN flac-1.2.1/src/libFLAC/bitwriter.c flac-1.2.1.new/src/libFLAC/bitwriter.c
--- flac-1.2.1/src/libFLAC/bitwriter.c	2007-09-10 16:08:38.000000000 -0700
+++ flac-1.2.1.new/src/libFLAC/bitwriter.c	2013-05-29 22:59:33.000000000 -0700
@@ -40,7 +40,12 @@
 #elif defined FLAC__SYS_DARWIN
 #include <machine/endian.h> /* for ntohl() */
 #elif defined __MINGW32__
-#include <winsock.h> /* for ntohl() */
+//#include <winsock.h> /* for ntohl() */
+static inline unsigned int ntohl(unsigned int x)
+{
+    __asm__("bswap %0": "=r"(x):"0"(x));
+    return x;
+}
 #else
 #include <netinet/in.h> /* for ntohl() */
 #endif