From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DKZwS-0005xJ-NK for qemu-devel@nongnu.org; Sun, 10 Apr 2005 06:45:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DKZwN-0005wB-Gu for qemu-devel@nongnu.org; Sun, 10 Apr 2005 06:45:21 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DKZwK-0005ts-8R for qemu-devel@nongnu.org; Sun, 10 Apr 2005 06:45:16 -0400 Received: from [65.74.133.9] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DKaIJ-0002tB-L9 for qemu-devel@nongnu.org; Sun, 10 Apr 2005 07:07:59 -0400 From: Paul Brook Date: Sun, 10 Apr 2005 12:06:36 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504101206.36632.paul@codesourcery.com> Subject: [Qemu-devel] Build error in block-cow.c Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org block-cow.c defined and uses a function named set_bit. Unfortunately this conflicts with an atomic operation declared in some system headers. The patch below renames it to cow_set_bit. Paul Index: block-cow.c =================================================================== RCS file: /cvsroot/qemu/qemu/block-cow.c,v retrieving revision 1.3 diff -u -p -r1.3 block-cow.c --- block-cow.c 18 Sep 2004 19:32:11 -0000 1.3 +++ block-cow.c 10 Apr 2005 11:02:38 -0000 @@ -124,7 +124,7 @@ static int cow_open(BlockDriverState *bs return -1; } -static inline void set_bit(uint8_t *bitmap, int64_t bitnum) +static inline void cow_set_bit(uint8_t *bitmap, int64_t bitnum) { bitmap[bitnum / 8] |= (1 << (bitnum%8)); } @@ -198,7 +198,7 @@ static int cow_write(BlockDriverState *b if (ret != nb_sectors * 512) return -1; for (i = 0; i < nb_sectors; i++) - set_bit(s->cow_bitmap, sector_num + i); + cow_set_bit(s->cow_bitmap, sector_num + i); return 0; }