All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Build error in block-cow.c
Date: Sun, 10 Apr 2005 12:06:36 +0100	[thread overview]
Message-ID: <200504101206.36632.paul@codesourcery.com> (raw)

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;
 }
 

                 reply	other threads:[~2005-04-10 10:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200504101206.36632.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.