From: Christoph Egger <Christoph.Egger@amd.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: libxl: build error
Date: Wed, 24 Oct 2012 12:50:59 +0200 [thread overview]
Message-ID: <5087C813.8090609@amd.com> (raw)
In-Reply-To: <1351072711.2237.139.camel@zakaz.uk.xensource.com>
[-- Attachment #1: Type: text/plain, Size: 996 bytes --]
On 10/24/12 11:58, Ian Campbell wrote:
> On Wed, 2012-10-24 at 10:36 +0100, Christoph Egger wrote:
>> Hi,
>>
>> I have this build error:
>>
>> xl_cmdimpl.c:3724:40: error: declaration of 'reboot' shadows a global
>> declaration
>
> Did gcc tell you where the other global definition was from?
No.
> reboot(2) I suppose?
Yes. <unistd.h> has the prototype.
>> Renaming it to '_reboot' fixes this for me.
>
> Can you send a patch?
>
> I don't think _reboot is a legal identifier (reserved for the
> implementation or POSIX or some such). do_reboot would be ok. So would
> changing main_shutdown_or_reboot to take the function pointer directly I
> think.
patch attached.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Christoph
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
[-- Attachment #2: xen_tools_libxl.diff --]
[-- Type: text/plain, Size: 703 bytes --]
diff -r ac870df4f165 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c Wed Oct 24 09:50:52 2012 +0200
+++ b/tools/libxl/xl_cmdimpl.c Wed Oct 24 11:19:59 2012 +0200
@@ -3721,11 +3721,11 @@ int main_destroy(int argc, char **argv)
return 0;
}
-static int main_shutdown_or_reboot(int reboot, int argc, char **argv)
+static int main_shutdown_or_reboot(int do_reboot, int argc, char **argv)
{
void (*fn)(uint32_t domid,
libxl_evgen_domain_death **, libxl_ev_user, int) =
- reboot ? &reboot_domain : &shutdown_domain;
+ do_reboot ? &reboot_domain : &shutdown_domain;
int opt, i, nb_domain;
int wait_for_it = 0, all =0;
int fallback_trigger = 0;
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2012-10-24 10:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 9:36 libxl: build error Christoph Egger
2012-10-24 9:58 ` Ian Campbell
2012-10-24 10:50 ` Christoph Egger [this message]
2012-10-24 11:16 ` Jan Beulich
2012-10-24 11:28 ` Ian Campbell
2012-10-25 11:53 ` libxl: build error [and 1 more messages] Ian Jackson
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=5087C813.8090609@amd.com \
--to=christoph.egger@amd.com \
--cc=Ian.Campbell@citrix.com \
--cc=xen-devel@lists.xen.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.