openbsd-ports/misc/cdrdao/patches/patch-scsilib_include_btorder_h
2005-05-31 19:40:24 +00:00

23 lines
806 B
Plaintext

$OpenBSD: patch-scsilib_include_btorder_h,v 1.3 2005/05/31 19:40:24 millert Exp $
--- scsilib/include/btorder.h.orig Sun Jun 15 15:41:22 2003
+++ scsilib/include/btorder.h Sun May 29 10:18:06 2005
@@ -28,6 +28,9 @@
#include <sys/types.h> /* try to load isa_defs.h on Solaris */
#define _INCL_SYS_TYPES_H
#endif
+#ifdef __OpenBSD__
+#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