0001-Fix-musl-build.patch 899 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. [PATCH] Fix musl build
  2. Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
  3. ---
  4. src/mtd.c | 1 +
  5. src/mtd.h | 5 +++++
  6. 2 files changed, 6 insertions(+)
  7. diff --git a/src/mtd.c b/src/mtd.c
  8. index 1edc441..6d2264c 100644
  9. --- a/src/mtd.c
  10. +++ b/src/mtd.c
  11. @@ -31,6 +31,7 @@
  12. #include <fcntl.h>
  13. #include <ctype.h>
  14. #include <errno.h>
  15. +#include <stddef.h>
  16. #include <sys/types.h>
  17. #include <sys/ioctl.h>
  18. diff --git a/src/mtd.h b/src/mtd.h
  19. index bd21add..debfc84 100644
  20. --- a/src/mtd.h
  21. +++ b/src/mtd.h
  22. @@ -31,6 +31,11 @@
  23. #include "BootControlBlocks.h"
  24. #include "rom_nand_hamming_code_ecc.h"
  25. +// musl library doesn't define loff_t
  26. +#if !defined(__GLIBC__) && !defined(__UCLIBC__)
  27. +#define loff_t off_t
  28. +#endif
  29. +
  30. //------------------------------------------------------------------------------
  31. // Re-definitions of true and false, because the standard ones aren't good
  32. // enough?
  33. --
  34. 2.5.1