mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Changes to make openzfs build within FreeBSD buildworld
A collection of header changes to enable FreeBSD to build with vendored OpenZFS. Reviewed-by: Ryan Moeller <ryan@ixsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10635
This commit is contained in:
@@ -84,9 +84,23 @@
|
||||
#define htonll(x) BMASK_64(x)
|
||||
#define ntohll(x) BMASK_64(x)
|
||||
#else
|
||||
#ifndef __LP64__
|
||||
static __inline__ uint64_t
|
||||
htonll(uint64_t n)
|
||||
{
|
||||
return ((((uint64_t)htonl(n)) << 32) + htonl(n >> 32));
|
||||
}
|
||||
|
||||
static __inline__ uint64_t
|
||||
ntohll(uint64_t n)
|
||||
{
|
||||
return ((((uint64_t)ntohl(n)) << 32) + ntohl(n >> 32));
|
||||
}
|
||||
#else
|
||||
#define htonll(x) BSWAP_64(x)
|
||||
#define ntohll(x) BSWAP_64(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define BE_IN32(xa) htonl(*((uint32_t *)(void *)(xa)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user