patch-scsilib_include_btorder_h 814 B

1234567891011121314151617181920212223
  1. $OpenBSD: patch-scsilib_include_btorder_h,v 1.5 2015/05/01 06:15:46 ajacoutot Exp $
  2. --- scsilib/include/btorder.h.orig Sun Jun 15 23:41:22 2003
  3. +++ scsilib/include/btorder.h Fri May 1 08:11:47 2015
  4. @@ -28,6 +28,9 @@
  5. #include <sys/types.h> /* try to load isa_defs.h on Solaris */
  6. #define _INCL_SYS_TYPES_H
  7. #endif
  8. +#ifdef __OpenBSD__
  9. +#include <endian.h>
  10. +#endif
  11. #ifndef _MCONFIG_H
  12. #include <mconfig.h> /* load bit/byte-oder from xmconfig.h*/
  13. @@ -108,7 +111,7 @@ error Only one of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTO
  14. # if defined(__ppc__) || defined(ppc) || defined(__ppc) || \
  15. defined(__PPC) || defined(powerpc) || defined(__powerpc__)
  16. -# if defined(__BIG_ENDIAN__)
  17. +# if defined(__BIG_ENDIAN__) || BYTE_ORDER == BIG_ENDIAN
  18. # define _BIT_FIELDS_HTOL
  19. # else
  20. # define _BIT_FIELDS_LTOH