aports/main/drbd/bits_per_long.patch
2014-04-03 14:51:01 +00:00

21 lines
432 B
Diff

--- ./user/drbd_endian.h.orig
+++ ./user/drbd_endian.h
@@ -13,9 +13,16 @@
#include <stdint.h>
#include <endian.h>
+#include <limits.h>
#ifndef BITS_PER_LONG
-# define BITS_PER_LONG __WORDSIZE
+# ifdef __WORDSIZE
+# define BITS_PER_LONG __WORDSIZE
+# elif ULONG_MAX == 0xffffffffffffffff
+# define BITS_PER_LONG 64
+# elif ULONG_MAX == 0xffffffff
+# define BITS_PER_LONG 32
+# endif
#endif
/* linux/byteorder/swab.h */