From: Andrew Deason <adeason@sinenomine.net>
To: qemu-devel@nongnu.org
Cc: Eduardo Habkost <eduardo@habkost.net>,
"Michael S. Tsirkin" <mst@redhat.com>,
Andrew Deason <adeason@sinenomine.net>,
Richard Henderson <richard.henderson@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>, Ani Sinha <ani@anisinha.ca>,
Igor Mammedov <imammedo@redhat.com>
Subject: [PATCH 2/2] hw/i386/acpi-build: Avoid 'sun' identifier
Date: Mon, 14 Mar 2022 10:45:57 -0500 [thread overview]
Message-ID: <20220314154557.306-3-adeason@sinenomine.net> (raw)
In-Reply-To: <20220314154557.306-1-adeason@sinenomine.net>
On Solaris, 'sun' is #define'd to 1, which causes errors if a variable
is named 'sun'. Slightly change the name of the var for the Slot User
Number so we can build on Solaris.
Signed-off-by: Andrew Deason <adeason@sinenomine.net>
---
hw/i386/acpi-build.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 4ad4d7286c..dcf6ece3d0 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -576,32 +576,32 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,
}
Aml *aml_pci_device_dsm(void)
{
Aml *method, *UUID, *ifctx, *ifctx1, *ifctx2, *ifctx3, *elsectx;
Aml *acpi_index = aml_local(0);
Aml *zero = aml_int(0);
Aml *bnum = aml_arg(4);
Aml *func = aml_arg(2);
Aml *rev = aml_arg(1);
- Aml *sun = aml_arg(5);
+ Aml *sunum = aml_arg(5);
method = aml_method("PDSM", 6, AML_SERIALIZED);
/*
* PCI Firmware Specification 3.1
* 4.6. _DSM Definitions for PCI
*/
UUID = aml_touuid("E5C937D0-3553-4D7A-9117-EA4D19C3434D");
ifctx = aml_if(aml_equal(aml_arg(0), UUID));
{
- aml_append(ifctx, aml_store(aml_call2("AIDX", bnum, sun), acpi_index));
+ aml_append(ifctx, aml_store(aml_call2("AIDX", bnum, sunum), acpi_index));
ifctx1 = aml_if(aml_equal(func, zero));
{
uint8_t byte_list[1];
ifctx2 = aml_if(aml_equal(rev, aml_int(2)));
{
/*
* advertise function 7 if device has acpi-index
* acpi_index values:
* 0: not present (default value)
--
2.11.0
prev parent reply other threads:[~2022-03-14 16:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 15:45 [PATCH 0/2] Fixes for building on Solaris 11.4.42 CBE Andrew Deason
2022-03-14 15:45 ` [PATCH 1/2] util/osdep: Avoid madvise proto on modern Solaris Andrew Deason
2022-03-14 16:36 ` Peter Maydell
2022-03-14 18:18 ` Andrew Deason
2022-03-14 18:46 ` Peter Maydell
2022-03-14 19:01 ` Daniel P. Berrangé
2022-03-14 21:33 ` Andrew Deason
2022-03-14 15:45 ` Andrew Deason [this message]
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=20220314154557.306-3-adeason@sinenomine.net \
--to=adeason@sinenomine.net \
--cc=ani@anisinha.ca \
--cc=eduardo@habkost.net \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).