From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Christoph Egger" Subject: [PATCH] libelf portability Date: Thu, 20 Sep 2007 16:17:59 +0200 Message-ID: <200709201617.59589.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_XEo8GJpulJO9iGO" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_XEo8GJpulJO9iGO Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi! Attached patch adds support for OpenBSD and NetBSD to libelf in relation to tools/libxc. Signed-off-by: Christoph Egger =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --Boundary-00=_XEo8GJpulJO9iGO Content-Type: text/plain; charset=us-ascii; name=libelf_libxc.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=libelf_libxc.diff diff -r a00cc97b392a xen/common/libelf/libelf-private.h --- a/xen/common/libelf/libelf-private.h Wed Sep 12 09:43:33 2007 +0100 +++ b/xen/common/libelf/libelf-private.h Thu Sep 20 16:01:28 2007 +0000 @@ -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 +#define bswap_16(x) bswap16(x) +#define bswap_32(x) bswap32(x) +#define bswap_64(x) bswap64(x) +#elif defined(__OpenBSD__) +#include +#define bswap_16(x) swap16(x) +#define bswap_32(x) swap32(x) +#define bswap_64(x) swap64(x) +#elif defined(__linux__) || defined(__Linux__) +#include #else -#include +#error Unsupported OS #endif #include #include --Boundary-00=_XEo8GJpulJO9iGO Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_XEo8GJpulJO9iGO--