ia64/xen-unstable

changeset 15950:35893e27bdeb

libelf: OpenBSD and NetBSD portability.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
author Keir Fraser <keir@xensource.com>
date Thu Sep 20 15:52:29 2007 +0100 (2007-09-20)
parents 7bd5b1f55308
children ecbddf7b7896
files xen/common/libelf/libelf-private.h
line diff
     1.1 --- a/xen/common/libelf/libelf-private.h	Thu Sep 20 15:41:22 2007 +0100
     1.2 +++ b/xen/common/libelf/libelf-private.h	Thu Sep 20 15:52:29 2007 +0100
     1.3 @@ -33,8 +33,20 @@
     1.4  #define bswap_16(x) BSWAP_16(x)
     1.5  #define bswap_32(x) BSWAP_32(x)
     1.6  #define bswap_64(x) BSWAP_64(x)
     1.7 +#elif defined(__NetBSD__)
     1.8 +#include <sys/bswap.h>
     1.9 +#define bswap_16(x) bswap16(x)
    1.10 +#define bswap_32(x) bswap32(x)
    1.11 +#define bswap_64(x) bswap64(x)
    1.12 +#elif defined(__OpenBSD__)
    1.13 +#include <machine/endian.h>
    1.14 +#define bswap_16(x) swap16(x)
    1.15 +#define bswap_32(x) swap32(x)
    1.16 +#define bswap_64(x) swap64(x)
    1.17 +#elif defined(__linux__) || defined(__Linux__)
    1.18 +#include <byteswap.h>
    1.19  #else
    1.20 -#include <byteswap.h>
    1.21 +#error Unsupported OS
    1.22  #endif
    1.23  #include <xen/elfnote.h>
    1.24  #include <xen/libelf.h>