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>
#include "qemu/iov.h"
#include "qemu/module.h"
#include "qemu/bitops.h"
-#include "libqos/malloc.h"
+#include "libqos/libqos-malloc.h"
#include "libqos/e1000e.h"
static void e1000e_send_verify(QE1000E *d, int *test_sockets, QGuestAllocator *alloc)
#include "qemu/main-loop.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_internal.h"
#include "tests/qtest/libqos/qos_external.h"
#include "qemu/osdep.h"
#include "../libqtest.h"
#include "qemu/module.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qgraph.h"
#include "sdhci.h"
#include "qemu/osdep.h"
#include "../libqtest.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qgraph.h"
#include "i2c.h"
#include "qemu/osdep.h"
#include "../libqtest.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qgraph.h"
#include "i2c.h"
#include "qemu/osdep.h"
#include "../libqtest.h"
#include "qemu/module.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qgraph.h"
#include "sdhci.h"
#include "qemu/osdep.h"
#include "../libqtest.h"
#include "qemu/module.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qgraph.h"
#include "sdhci.h"
#include "qemu/osdep.h"
#include "../libqtest.h"
#include "qemu/module.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qgraph.h"
#include "sdhci.h"
#include "qemu/osdep.h"
#include "../libqtest.h"
#include "qemu/module.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qgraph.h"
#include "virtio-mmio.h"
#include "generic-pcihost.h"
#include "qemu/osdep.h"
#include "../libqtest.h"
#include "qemu/module.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qgraph.h"
#include "sdhci.h"
#include "qemu/iov.h"
#include "qemu/module.h"
#include "qemu/bitops.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qgraph.h"
#include "e1000e.h"
#define LIBQOS_GENERIC_PCIHOST_H
#include "pci.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qgraph.h"
typedef struct QGenericPCIBus {
*/
#include "qemu/osdep.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qemu/host-utils.h"
typedef struct MemBlock {
#include "../libqtest.h"
#include "pci.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
typedef struct QOSState QOSState;
#ifndef 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);
#ifndef 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);
'qos_external.c',
'pci.c',
'fw_cfg.c',
- 'malloc.c',
+ 'libqos-malloc.c',
'libqos.c',
'sdhci-cmd.c',
#define LIBQOS_PCI_PC_H
#include "pci.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qgraph.h"
typedef struct QPCIBusPC {
#ifndef LIBQOS_PCI_SPAPR_H
#define LIBQOS_PCI_SPAPR_H
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "pci.h"
#include "qgraph.h"
#include <gmodule.h>
#include "qemu/module.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
/* maximum path length */
#define QOS_PATH_MAX_ELEMENT_SIZE 50
#include "qapi/qmp/qstring.h"
#include "qemu/module.h"
#include "qapi/qmp/qlist.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qgraph.h"
#include "qgraph_internal.h"
#include "qos_external.h"
#include "qgraph.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qapi/qapi-types-machine.h"
#include "qapi/qapi-types-qom.h"
#ifndef LIBQOS_RTAS_H
#define LIBQOS_RTAS_H
-#include "malloc.h"
+#include "libqos-malloc.h"
int qrtas_get_time_of_day(QTestState *qts, QGuestAllocator *alloc,
struct tm *tm, uint32_t *ns);
#include "qemu/module.h"
#include "virtio.h"
#include "virtio-mmio.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "qgraph.h"
#include "standard-headers/linux/virtio_ring.h"
#include "virtio-pci.h"
#include "pci.h"
#include "pci-pc.h"
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "malloc-pc.h"
#include "qgraph.h"
#include "standard-headers/linux/virtio_ring.h"
#ifndef LIBQOS_VIRTIO_H
#define LIBQOS_VIRTIO_H
-#include "malloc.h"
+#include "libqos-malloc.h"
#include "standard-headers/linux/virtio_ring.h"
#define QVIRTIO_F_BAD_FEATURE 0x40000000ull
#include "qapi/qobject-input-visitor.h"
#include "qapi/qapi-visit-machine.h"
#include "qapi/qapi-visit-qom.h"
-#include "libqos/malloc.h"
+#include "libqos/libqos-malloc.h"
#include "libqos/qgraph.h"
#include "libqos/qgraph_internal.h"
#include "libqos/qos_external.h"