mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix compilation error in mingw
__LITTLE_ENDIAN is not defined.
This commit is contained in:
parent
b57c7be6a9
commit
45bcab3c84
Notes:
git
2021-05-05 09:38:23 +09:00
1 changed files with 9 additions and 2 deletions
11
siphash.c
11
siphash.c
|
@ -5,11 +5,18 @@
|
|||
#define SIP_HASH_STREAMING 1
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(__MINGW32__)
|
||||
#include <sys/param.h>
|
||||
|
||||
/* MinGW only defines LITTLE_ENDIAN and BIG_ENDIAN macros */
|
||||
#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
#define __BIG_ENDIAN BIG_ENDIAN
|
||||
#elif defined(_WIN32)
|
||||
#define BYTE_ORDER __LITTLE_ENDIAN
|
||||
#elif !defined BYTE_ORDER
|
||||
#elif !defined(BYTE_ORDER)
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#ifndef LITTLE_ENDIAN
|
||||
#define LITTLE_ENDIAN __LITTLE_ENDIAN
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue