From: Gonglei <arei.gonglei@huawei.com>
To: Alex Williamson <alex.williamson@redhat.com>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>, eric.auger@linaro.org
Subject: Re: [Qemu-devel] [PULL v2 1/3] hw/vfio/platform: vfio-platform skeleton
Date: Thu, 11 Jun 2015 10:21:32 +0800 [thread overview]
Message-ID: <5578F0AC.8060805@huawei.com> (raw)
In-Reply-To: <20150609155514.21713.26061.stgit@gimli.home>
On 2015/6/9 23:55, Alex Williamson wrote:
> +static int vfio_populate_device(VFIODevice *vbasedev)
> +{
> + int i, ret = -1;
> + VFIOPlatformDevice *vdev =
> + container_of(vbasedev, VFIOPlatformDevice, vbasedev);
> +
> + if (!(vbasedev->flags & VFIO_DEVICE_FLAGS_PLATFORM)) {
> + error_report("vfio: Um, this isn't a platform device");
> + return ret;
> + }
> +
> + vdev->regions = g_malloc0_n(vbasedev->num_regions,
> + sizeof(VFIORegion *));
Failed to build on SUSE11.3:
/home/qemu/hw/vfio/platform.c: In function ‘vfio_populate_device’:
/home/qemu/hw/vfio/platform.c:349: warning: implicit declaration of function ‘g_malloc0_n’
/home/qemu/hw/vfio/platform.c:349: warning: nested extern declaration of ‘g_malloc0_n’
/home/qemu/hw/vfio/platform.c:350: warning: assignment makes pointer from integer without a cast
CC x86_64-softmmu/hw/i386/pc_q35.o
CC x86_64-softmmu/hw/i386/pc_sysfw.o
CC x86_64-softmmu/hw/i386/acpi-build.o
CC x86_64-softmmu/hw/i386/kvm/pci-assign.o
CC x86_64-softmmu/target-i386/translate.o
GEN trace/generated-helpers.c
CC x86_64-softmmu/trace/generated-helpers.o
LINK x86_64-softmmu/qemu-system-x86_64
hw/vfio/platform.o: In function `vfio_populate_device':
/home/qemu/hw/vfio/platform.c:349: undefined reference to `g_malloc0_n'
collect2: ld returned 1 exit status
make[1]: *** [qemu-system-x86_64] Error 1
make: *** [subdir-x86_64-softmmu] Error 2
That's because g_malloc0_n() introduced since glib-2.24,
but QEMU just require glib-2.22.
Regards,
-Gonglei
next prev parent reply other threads:[~2015-06-11 2:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 15:55 [Qemu-devel] [PULL v2 0/3] Initial vfio-platform support Alex Williamson
2015-06-09 15:55 ` [Qemu-devel] [PULL v2 1/3] hw/vfio/platform: vfio-platform skeleton Alex Williamson
2015-06-11 2:21 ` Gonglei [this message]
2015-06-11 6:50 ` Eric Auger
2015-06-11 8:47 ` Peter Maydell
2015-06-09 15:55 ` [Qemu-devel] [PULL v2 2/3] hw/vfio/platform: add irq assignment Alex Williamson
2015-06-09 15:55 ` [Qemu-devel] [PULL v2 3/3] hw/vfio/platform: calxeda xgmac device Alex Williamson
2015-06-10 15:52 ` [Qemu-devel] [PULL v2 0/3] Initial vfio-platform support Peter Maydell
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=5578F0AC.8060805@huawei.com \
--to=arei.gonglei@huawei.com \
--cc=alex.williamson@redhat.com \
--cc=eric.auger@linaro.org \
--cc=peter.maydell@linaro.org \
--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.