tests/qtest: libqos: Rename malloc.h to libqos-malloc.h
The qtest/libqos directory is included via the "-I" option to search for header files when building qtest. Unfortunately the malloc.h has a name conflict with the standard libc header, leading to a build failure on the Windows host, due to the MinGW libc stdlib.h header file includes malloc.h and it now gets wrongly pointed to the one in the qtest/libqos directory. Rename "qtest/libqos/malloc.h" to "qtest/libqos/libqos-malloc.h" to avoid the namespace pollution. Signed-off-by: Xuzhou Cheng <xuzhou.cheng@windriver.com> Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220824094029.1634519-26-bmeng.cn@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
e0e4c27c6f
commit
b243c73cf4
@ -31,7 +31,7 @@
|
|||||||
#include "qemu/iov.h"
|
#include "qemu/iov.h"
|
||||||
#include "qemu/module.h"
|
#include "qemu/module.h"
|
||||||
#include "qemu/bitops.h"
|
#include "qemu/bitops.h"
|
||||||
#include "libqos/malloc.h"
|
#include "libqos/libqos-malloc.h"
|
||||||
#include "libqos/e1000e.h"
|
#include "libqos/e1000e.h"
|
||||||
|
|
||||||
static void e1000e_send_verify(QE1000E *d, int *test_sockets, QGuestAllocator *alloc)
|
static void e1000e_send_verify(QE1000E *d, int *test_sockets, QGuestAllocator *alloc)
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "qemu/main-loop.h"
|
#include "qemu/main-loop.h"
|
||||||
|
|
||||||
#include "tests/qtest/libqtest.h"
|
#include "tests/qtest/libqtest.h"
|
||||||
#include "tests/qtest/libqos/malloc.h"
|
#include "tests/qtest/libqos/libqos-malloc.h"
|
||||||
#include "tests/qtest/libqos/qgraph.h"
|
#include "tests/qtest/libqos/qgraph.h"
|
||||||
#include "tests/qtest/libqos/qgraph_internal.h"
|
#include "tests/qtest/libqos/qgraph_internal.h"
|
||||||
#include "tests/qtest/libqos/qos_external.h"
|
#include "tests/qtest/libqos/qos_external.h"
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "../libqtest.h"
|
#include "../libqtest.h"
|
||||||
#include "qemu/module.h"
|
#include "qemu/module.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
#include "sdhci.h"
|
#include "sdhci.h"
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "../libqtest.h"
|
#include "../libqtest.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
#include "i2c.h"
|
#include "i2c.h"
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "../libqtest.h"
|
#include "../libqtest.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
#include "i2c.h"
|
#include "i2c.h"
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "../libqtest.h"
|
#include "../libqtest.h"
|
||||||
#include "qemu/module.h"
|
#include "qemu/module.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
#include "sdhci.h"
|
#include "sdhci.h"
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "../libqtest.h"
|
#include "../libqtest.h"
|
||||||
#include "qemu/module.h"
|
#include "qemu/module.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
#include "sdhci.h"
|
#include "sdhci.h"
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "../libqtest.h"
|
#include "../libqtest.h"
|
||||||
#include "qemu/module.h"
|
#include "qemu/module.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
#include "sdhci.h"
|
#include "sdhci.h"
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "../libqtest.h"
|
#include "../libqtest.h"
|
||||||
#include "qemu/module.h"
|
#include "qemu/module.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
#include "virtio-mmio.h"
|
#include "virtio-mmio.h"
|
||||||
#include "generic-pcihost.h"
|
#include "generic-pcihost.h"
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "../libqtest.h"
|
#include "../libqtest.h"
|
||||||
#include "qemu/module.h"
|
#include "qemu/module.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
#include "sdhci.h"
|
#include "sdhci.h"
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "qemu/iov.h"
|
#include "qemu/iov.h"
|
||||||
#include "qemu/module.h"
|
#include "qemu/module.h"
|
||||||
#include "qemu/bitops.h"
|
#include "qemu/bitops.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
#include "e1000e.h"
|
#include "e1000e.h"
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#define LIBQOS_GENERIC_PCIHOST_H
|
#define LIBQOS_GENERIC_PCIHOST_H
|
||||||
|
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
|
|
||||||
typedef struct QGenericPCIBus {
|
typedef struct QGenericPCIBus {
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qemu/host-utils.h"
|
#include "qemu/host-utils.h"
|
||||||
|
|
||||||
typedef struct MemBlock {
|
typedef struct MemBlock {
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "../libqtest.h"
|
#include "../libqtest.h"
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
|
|
||||||
typedef struct QOSState QOSState;
|
typedef struct QOSState QOSState;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#ifndef LIBQOS_MALLOC_PC_H
|
#ifndef LIBQOS_MALLOC_PC_H
|
||||||
#define LIBQOS_MALLOC_PC_H
|
#define LIBQOS_MALLOC_PC_H
|
||||||
|
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
|
|
||||||
void pc_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags);
|
void pc_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags);
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#ifndef LIBQOS_MALLOC_SPAPR_H
|
#ifndef LIBQOS_MALLOC_SPAPR_H
|
||||||
#define LIBQOS_MALLOC_SPAPR_H
|
#define LIBQOS_MALLOC_SPAPR_H
|
||||||
|
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
|
|
||||||
void spapr_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags);
|
void spapr_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags);
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ libqos_srcs = files(
|
|||||||
'qos_external.c',
|
'qos_external.c',
|
||||||
'pci.c',
|
'pci.c',
|
||||||
'fw_cfg.c',
|
'fw_cfg.c',
|
||||||
'malloc.c',
|
'libqos-malloc.c',
|
||||||
'libqos.c',
|
'libqos.c',
|
||||||
'sdhci-cmd.c',
|
'sdhci-cmd.c',
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#define LIBQOS_PCI_PC_H
|
#define LIBQOS_PCI_PC_H
|
||||||
|
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
|
|
||||||
typedef struct QPCIBusPC {
|
typedef struct QPCIBusPC {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#ifndef LIBQOS_PCI_SPAPR_H
|
#ifndef LIBQOS_PCI_SPAPR_H
|
||||||
#define LIBQOS_PCI_SPAPR_H
|
#define LIBQOS_PCI_SPAPR_H
|
||||||
|
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <gmodule.h>
|
#include <gmodule.h>
|
||||||
#include "qemu/module.h"
|
#include "qemu/module.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
|
|
||||||
/* maximum path length */
|
/* maximum path length */
|
||||||
#define QOS_PATH_MAX_ELEMENT_SIZE 50
|
#define QOS_PATH_MAX_ELEMENT_SIZE 50
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include "qapi/qmp/qstring.h"
|
#include "qapi/qmp/qstring.h"
|
||||||
#include "qemu/module.h"
|
#include "qemu/module.h"
|
||||||
#include "qapi/qmp/qlist.h"
|
#include "qapi/qmp/qlist.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
#include "qgraph_internal.h"
|
#include "qgraph_internal.h"
|
||||||
#include "qos_external.h"
|
#include "qos_external.h"
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
|
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qapi/qapi-types-machine.h"
|
#include "qapi/qapi-types-machine.h"
|
||||||
#include "qapi/qapi-types-qom.h"
|
#include "qapi/qapi-types-qom.h"
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#ifndef LIBQOS_RTAS_H
|
#ifndef LIBQOS_RTAS_H
|
||||||
#define LIBQOS_RTAS_H
|
#define LIBQOS_RTAS_H
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
|
|
||||||
int qrtas_get_time_of_day(QTestState *qts, QGuestAllocator *alloc,
|
int qrtas_get_time_of_day(QTestState *qts, QGuestAllocator *alloc,
|
||||||
struct tm *tm, uint32_t *ns);
|
struct tm *tm, uint32_t *ns);
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "qemu/module.h"
|
#include "qemu/module.h"
|
||||||
#include "virtio.h"
|
#include "virtio.h"
|
||||||
#include "virtio-mmio.h"
|
#include "virtio-mmio.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
#include "standard-headers/linux/virtio_ring.h"
|
#include "standard-headers/linux/virtio_ring.h"
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "virtio-pci.h"
|
#include "virtio-pci.h"
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
#include "pci-pc.h"
|
#include "pci-pc.h"
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "malloc-pc.h"
|
#include "malloc-pc.h"
|
||||||
#include "qgraph.h"
|
#include "qgraph.h"
|
||||||
#include "standard-headers/linux/virtio_ring.h"
|
#include "standard-headers/linux/virtio_ring.h"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef LIBQOS_VIRTIO_H
|
#ifndef LIBQOS_VIRTIO_H
|
||||||
#define LIBQOS_VIRTIO_H
|
#define LIBQOS_VIRTIO_H
|
||||||
|
|
||||||
#include "malloc.h"
|
#include "libqos-malloc.h"
|
||||||
#include "standard-headers/linux/virtio_ring.h"
|
#include "standard-headers/linux/virtio_ring.h"
|
||||||
|
|
||||||
#define QVIRTIO_F_BAD_FEATURE 0x40000000ull
|
#define QVIRTIO_F_BAD_FEATURE 0x40000000ull
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include "qapi/qobject-input-visitor.h"
|
#include "qapi/qobject-input-visitor.h"
|
||||||
#include "qapi/qapi-visit-machine.h"
|
#include "qapi/qapi-visit-machine.h"
|
||||||
#include "qapi/qapi-visit-qom.h"
|
#include "qapi/qapi-visit-qom.h"
|
||||||
#include "libqos/malloc.h"
|
#include "libqos/libqos-malloc.h"
|
||||||
#include "libqos/qgraph.h"
|
#include "libqos/qgraph.h"
|
||||||
#include "libqos/qgraph_internal.h"
|
#include "libqos/qgraph_internal.h"
|
||||||
#include "libqos/qos_external.h"
|
#include "libqos/qos_external.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user