Skip to content

Commit

Permalink
Merge pull request #358 from OronDF343/fix-musl
Browse files Browse the repository at this point in the history
Fix build errors on alpine linux / musl (undefined reference to `__bswap_*`)
  • Loading branch information
sahlberg authored Jul 15, 2024
2 parents e4772ec + e88b26f commit 9e4b679
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/portable-endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@

#if defined(__linux__) || defined(__CYGWIN__) || defined(PS4_PLATFORM) || defined(ESP_PLATFORM)
#include <endian.h>
/* Include byteswap.h on linux since it might not be automatically included in some cases (e.g. alpine / musl) */
#if defined(__linux__)
#include <byteswap.h>
#endif
#else
#include <sys/endian.h>
#endif
Expand Down

0 comments on commit 9e4b679

Please sign in to comment.