packages/sound/shairplay/patches/003-fix_big-endian.patch
Ted Hess a9f87e3851 shairplay: Move to sound menu and sub-directory
Signed-off-by: Ted Hess <thess@kitschensync.net>
2015-02-04 15:13:08 -05:00

24 lines
578 B
Diff

--- a/src/lib/alac/alac.c
+++ b/src/lib/alac/alac.c
@@ -29,11 +29,7 @@
*
*/
-#ifdef __BIG_ENDIAN__
-static const int host_bigendian = 1;
-#else
-static const int host_bigendian = 0;
-#endif
+static int host_bigendian = 0;
#include <stdio.h>
#include <stdlib.h>
@@ -1181,6 +1177,8 @@ alac_file *create_alac(int samplesize, i
{
alac_file *newfile = malloc(sizeof(alac_file));
+ host_bigendian = (htonl(42) == 42);
+
newfile->samplesize = samplesize;
newfile->numchannels = numchannels;
newfile->bytespersample = (samplesize / 8) * numchannels;