mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-25 11:22:30 +01:00
21 lines
432 B
Diff
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 */
|