mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-29 16:04:33 +00:00
Add endian swap defines for where missing.
This commit is contained in:
parent
a47a7886d5
commit
a8e1ebb11c
4
miner.h
4
miner.h
@ -143,11 +143,15 @@ static inline int fsync (int fd)
|
|||||||
* htobe64 also won't exist */
|
* htobe64 also won't exist */
|
||||||
#ifndef htobe32
|
#ifndef htobe32
|
||||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
|
# define htole16(x) (x)
|
||||||
|
# define htole32(x) (x)
|
||||||
# define be32toh(x) bswap_32(x)
|
# define be32toh(x) bswap_32(x)
|
||||||
# define be64toh(x) bswap_64(x)
|
# define be64toh(x) bswap_64(x)
|
||||||
# define htobe32(x) bswap_32(x)
|
# define htobe32(x) bswap_32(x)
|
||||||
# define htobe64(x) bswap_64(x)
|
# define htobe64(x) bswap_64(x)
|
||||||
# elif __BYTE_ORDER == __BIG_ENDIAN
|
# elif __BYTE_ORDER == __BIG_ENDIAN
|
||||||
|
# define htole16(x) bswap_16(x)
|
||||||
|
# define htole32(x) bswap_32(x)
|
||||||
# define be32toh(x) (x)
|
# define be32toh(x) (x)
|
||||||
# define be64toh(x) (x)
|
# define be64toh(x) (x)
|
||||||
# define htobe32(x) (x)
|
# define htobe32(x) (x)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user