diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-12-21 09:26:48 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-12-21 09:26:48 +0900 |
| commit | 445c64d0ad95ec9e4918e2f2ffedcd1df1ce96bf (patch) | |
| tree | ab536d78d8e0cc9eb01c74d426d9e74cc882dd53 /mrbgems/mruby-pack | |
| parent | f5537912abed308ad6967ae52bfa8699f14dae93 (diff) | |
| download | mruby-445c64d0ad95ec9e4918e2f2ffedcd1df1ce96bf.tar.gz mruby-445c64d0ad95ec9e4918e2f2ffedcd1df1ce96bf.zip | |
Fixed a bug on platforms without `BYTE_ORDER`; ref #4190
Diffstat (limited to 'mrbgems/mruby-pack')
| -rw-r--r-- | mrbgems/mruby-pack/src/pack.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mrbgems/mruby-pack/src/pack.c b/mrbgems/mruby-pack/src/pack.c index ed9f4d77f..1b1f86a88 100644 --- a/mrbgems/mruby-pack/src/pack.c +++ b/mrbgems/mruby-pack/src/pack.c @@ -71,7 +71,9 @@ static unsigned char base64_dec_tab[128]; # elif BYTE_ORDER == LITTLE_ENDIAN # define littleendian 1 # define check_little_endian() (void)0 -# else +# endif +#endif +#ifndef littleendian /* can't distinguish endian in compile time */ static int littleendian = 0; static void @@ -80,7 +82,6 @@ check_little_endian(void) unsigned int n = 1; littleendian = (*(unsigned char *)&n == 1); } -# endif #endif static unsigned int |
