123456789101112131415161718192021222324252627282930313233 |
- $OpenBSD: patch-src_osdep_byteorder_h,v 1.3 2015/05/01 17:40:58 ajacoutot Exp $
- --- src/osdep/byteorder.h.orig Wed Aug 24 21:36:30 2011
- +++ src/osdep/byteorder.h Wed Aug 24 21:55:32 2011
- @@ -167,7 +167,7 @@
- * Solaris
- * -------
- */
- - #if defined(__sparc__)
- + #if defined(__sun) && defined(__SVR4)
- #include <sys/byteorder.h>
- #include <sys/types.h>
- #include <unistd.h>
- @@ -210,6 +210,19 @@
- // FreeBSD
- #ifdef __FreeBSD__
- #include <machine/endian.h>
- + #endif
- +
- + #ifdef __OpenBSD__
- + #include <endian.h>
- +
- + #define __cpu_to_be64(x) htobe64(x)
- + #define __cpu_to_be32(x) htobe32(x)
- + #define __be64_to_cpu(x) betoh64(x)
- + #define __be32_to_cpu(x) betoh32(x)
- + #define __le32_to_cpu(x) letoh32(x)
- + #define __le16_to_cpu(x) letoh16(x)
- +
- + #define AIRCRACK_NG_BYTE_ORDER_DEFINED
- #endif
-
- // XXX: Is there anything to include on OpenBSD/NetBSD/DragonFlyBSD/...?
|