From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2s8A-0002Tj-AR for qemu-devel@nongnu.org; Wed, 10 Jun 2015 22:22:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z2s86-0007d7-B0 for qemu-devel@nongnu.org; Wed, 10 Jun 2015 22:22:10 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:44995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2s85-0007aR-O0 for qemu-devel@nongnu.org; Wed, 10 Jun 2015 22:22:06 -0400 Message-ID: <5578F0AC.8060805@huawei.com> Date: Thu, 11 Jun 2015 10:21:32 +0800 From: Gonglei MIME-Version: 1.0 References: <20150609155320.21713.63776.stgit@gimli.home> <20150609155514.21713.26061.stgit@gimli.home> In-Reply-To: <20150609155514.21713.26061.stgit@gimli.home> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PULL v2 1/3] hw/vfio/platform: vfio-platform skeleton List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson , qemu-devel@nongnu.org Cc: Peter Maydell , eric.auger@linaro.org 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