diff --git a/user/shared/drbd_endian.h b/user/shared/drbd_endian.h index 69f7145..515c942 100644 --- a/user/shared/drbd_endian.h +++ b/user/shared/drbd_endian.h @@ -13,12 +13,17 @@ #include #include +#include #ifndef BITS_PER_LONG # if defined(__SIZEOF_LONG__) # define BITS_PER_LONG (__SIZEOF_LONG__ * 8) # elif defined(__WORDSIZE) # define BITS_PER_LONG __WORDSIZE +# elif ULONG_MAX == 0xffffffffffffffff +# define BITS_PER_LONG 64 +# elif ULONG_MAX == 0xffffffff +# define BITS_PER_LONG 32 # else /* wtf is wrong with your libc headers? */ # error "neither BITS_PER_LONG, __SIZEOF_LONG__, nor __WORDSIZE defined" # endif