From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Pau Monne Subject: [PATCH 4 of 5] blktap2: remove HAVE_BYTESWAP_H checking, since it's defined by qemu Date: Sun, 18 Dec 2011 13:48:24 +0100 Message-ID: <7bcb3a61ce8846f8e783.1324212504@alpine.localdomain> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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 # HG changeset patch # User Roger Pau Monne # Date 1324171782 -3600 # Node ID 7bcb3a61ce8846f8e7834d14c460c0f4b4869222 # Parent c0d5aa328f1ab24aad5880e720852b6dc8ffd4fb blktap2: remove HAVE_BYTESWAP_H checking, since it's defined by qemu blktap2 was using defines set by qemu, even when the qemu config file is not included. Remove this checkings, and instead check if the file has been included before defining the necessary macros. The output error is: bswap.h:23:0: error: "bswap_16" redefined [-Werror] /usr/include/byteswap.h:30:0: note: this is the location of the previous definition bswap.h:31:0: error: "bswap_32" redefined [-Werror] /usr/include/byteswap.h:33:0: note: this is the location of the previous definition bswap.h:41:0: error: "bswap_64" redefined [-Werror] /usr/include/byteswap.h:37:0: note: this is the location of the previous definition cc1: all warnings being treated as errors Signed-off-by: Roger Pau Monne diff -r c0d5aa328f1a -r 7bcb3a61ce88 tools/blktap2/drivers/bswap.h --- a/tools/blktap2/drivers/bswap.h Sun Dec 18 02:29:42 2011 +0100 +++ b/tools/blktap2/drivers/bswap.h Sun Dec 18 02:29:42 2011 +0100 @@ -15,9 +15,7 @@ #define bswap_64(x) swap64(x) #else -#ifdef HAVE_BYTESWAP_H -#include -#else +#ifndef _BYTESWAP_H #define bswap_16(x) \ ({ \ @@ -51,7 +49,7 @@ (uint64_t)(((uint64_t)(__x) & (uint64_t)0xff00000000000000ULL) >> 56) )); \ }) -#endif /* !HAVE_BYTESWAP_H */ +#endif /* !_BYTESWAP_H */ static inline uint16_t bswap16(uint16_t x) {