Няма описание

003-fix_big-endian.patch 578B

123456789101112131415161718192021222324
  1. --- a/src/lib/alac/alac.c
  2. +++ b/src/lib/alac/alac.c
  3. @@ -29,11 +29,7 @@
  4. *
  5. */
  6. -#ifdef __BIG_ENDIAN__
  7. -static const int host_bigendian = 1;
  8. -#else
  9. -static const int host_bigendian = 0;
  10. -#endif
  11. +static int host_bigendian = 0;
  12. #include <stdio.h>
  13. #include <stdlib.h>
  14. @@ -1181,6 +1177,8 @@ alac_file *create_alac(int samplesize, i
  15. {
  16. alac_file *newfile = malloc(sizeof(alac_file));
  17. + host_bigendian = (htonl(42) == 42);
  18. +
  19. newfile->samplesize = samplesize;
  20. newfile->numchannels = numchannels;
  21. newfile->bytespersample = (samplesize / 8) * numchannels;