blob: e457d54ac6cbed18eb7ffedb1279398d4cb3470f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
$NetBSD: patch-ac,v 1.4 2004/05/29 08:05:08 dillo Exp $
--- scsilib/include/btorder.h.orig 2004-02-10 00:34:00.000000000 +0100
+++ scsilib/include/btorder.h
@@ -28,6 +28,9 @@
#include <sys/types.h> /* try to load isa_defs.h on Solaris */
#define _INCL_SYS_TYPES_H
#endif
+#ifdef __NetBSD__
+#include <machine/endian.h>
+#endif
#ifndef _MCONFIG_H
#include <mconfig.h> /* load bit/byte-oder from xmconfig.h*/
@@ -108,7 +111,7 @@ error Only one of _BIT_FIELDS_LTOH or _
# if defined(__ppc__) || defined(ppc) || defined(__ppc) || \
defined(__PPC) || defined(powerpc) || defined(__powerpc__)
-# if defined(__BIG_ENDIAN__)
+# if defined(__BIG_ENDIAN__) || BYTE_ORDER == BIG_ENDIAN
# define _BIT_FIELDS_HTOL
# else
# define _BIT_FIELDS_LTOH
|