Skip to content

Commit 561c99e

Browse files
pinotreeslouken
authored andcommitted
SDL_endian.h: extend Linux way for GNU libc
The currently used way to determine the endianness (i.e. include <endian.h> and use the __BYTE_ORDER macro) is provided in general by GNU libc. Thus, extend that to any platform/OS based on GNU libc.
1 parent f439e44 commit 561c99e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/SDL3/SDL_endian.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ _m_prefetch(void *__P)
128128
* \sa SDL_BIG_ENDIAN
129129
*/
130130
#define SDL_BYTEORDER SDL_LIL_ENDIAN___or_maybe___SDL_BIG_ENDIAN
131-
#elif defined(SDL_PLATFORM_LINUX)
131+
#elif defined(SDL_PLATFORM_LINUX) || defined(__GLIBC__)
132132
#include <endian.h>
133133
#define SDL_BYTEORDER __BYTE_ORDER
134134
#elif defined(SDL_PLATFORM_SOLARIS)

0 commit comments

Comments
 (0)