mirror of
https://github.com/GOSTSec/sgminer
synced 2025-03-10 12:41:02 +00:00
Fix lack of htobe64 on mingw32.
This commit is contained in:
parent
ccaf731481
commit
a977fa4766
5
miner.h
5
miner.h
@ -139,14 +139,17 @@ static inline int fsync (int fd)
|
|||||||
#endif
|
#endif
|
||||||
#endif /* !defined(__GLXBYTEORDER_H__) */
|
#endif /* !defined(__GLXBYTEORDER_H__) */
|
||||||
|
|
||||||
/* This assumes htobe32 is a macro in endian.h */
|
/* This assumes htobe32 is a macro in endian.h, and if it doesn't exist, then
|
||||||
|
* htobe64 also won't exist */
|
||||||
#ifndef htobe32
|
#ifndef htobe32
|
||||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
# define be32toh(x) bswap_32(x)
|
# define be32toh(x) bswap_32(x)
|
||||||
# define htobe32(x) bswap_32(x)
|
# define htobe32(x) bswap_32(x)
|
||||||
|
# define htobe64(x) bswap_32(x)
|
||||||
# elif __BYTE_ORDER == __BIG_ENDIAN
|
# elif __BYTE_ORDER == __BIG_ENDIAN
|
||||||
# define be32toh(x) (x)
|
# define be32toh(x) (x)
|
||||||
# define htobe32(x) (x)
|
# define htobe32(x) (x)
|
||||||
|
# define htobe64(x) (x)
|
||||||
#else
|
#else
|
||||||
#error UNKNOWN BYTE ORDER
|
#error UNKNOWN BYTE ORDER
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user