[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libelf: OpenBSD and NetBSD portability.



# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1190299949 -3600
# Node ID 35893e27bdeb717333131102b7ee82eeccdc451b
# Parent  7bd5b1f55308bb08228d8c3a4ed778b496f6cf3a
libelf: OpenBSD and NetBSD portability.
Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
 xen/common/libelf/libelf-private.h |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletion(-)

diff -r 7bd5b1f55308 -r 35893e27bdeb xen/common/libelf/libelf-private.h
--- a/xen/common/libelf/libelf-private.h        Thu Sep 20 15:41:22 2007 +0100
+++ b/xen/common/libelf/libelf-private.h        Thu Sep 20 15:52:29 2007 +0100
@@ -33,8 +33,20 @@
 #define bswap_16(x) BSWAP_16(x)
 #define bswap_32(x) BSWAP_32(x)
 #define bswap_64(x) BSWAP_64(x)
+#elif defined(__NetBSD__)
+#include <sys/bswap.h>
+#define bswap_16(x) bswap16(x)
+#define bswap_32(x) bswap32(x)
+#define bswap_64(x) bswap64(x)
+#elif defined(__OpenBSD__)
+#include <machine/endian.h>
+#define bswap_16(x) swap16(x)
+#define bswap_32(x) swap32(x)
+#define bswap_64(x) swap64(x)
+#elif defined(__linux__) || defined(__Linux__)
+#include <byteswap.h>
 #else
-#include <byteswap.h>
+#error Unsupported OS
 #endif
 #include <xen/elfnote.h>
 #include <xen/libelf.h>

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.