Skip to content

Commit

Permalink
Fix endian code for M1 processors
Browse files Browse the repository at this point in the history
  • Loading branch information
simonfuhrmann committed Apr 25, 2022
1 parent b9eba7e commit 354a652
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libs/util/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,13 @@ print_build_timestamp (char const* application_name)
# define HOST_BYTEORDER_LE
#endif

/*
* The only Apple architectures with big-endian are PowerPC 32 and 64 bit.
*/
#if defined(__APPLE__)
# if defined(__ppc__) || defined(__ppc64__)
# define HOST_BYTEORDER_BE
# elif defined(__i386__) || defined(__x86_64__)
# else
# define HOST_BYTEORDER_LE
# endif
#endif
Expand Down

0 comments on commit 354a652

Please sign in to comment.