diff options
Diffstat (limited to 'main/drbd-utils/bits_per_long.patch')
-rw-r--r-- | main/drbd-utils/bits_per_long.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/main/drbd-utils/bits_per_long.patch b/main/drbd-utils/bits_per_long.patch new file mode 100644 index 0000000000..f6b580eedb --- /dev/null +++ b/main/drbd-utils/bits_per_long.patch @@ -0,0 +1,22 @@ +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 <stdint.h> + #include <endian.h> ++#include <limits.h> + + #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 |