Commit 91f32b0c authored by Stefan Hajnoczi's avatar Stefan Hajnoczi Committed by Andreas Färber
Browse files

qtest: Include system headers before user headers



It is dangerous to include user headers before system headers since user
macros can affect system headers.

Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
parent e41b509d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@
 * See the COPYING file in the top-level directory.
 *
 */
#include "libqtest.h"

#include <glib.h>
#include <stdio.h>
@@ -18,6 +17,7 @@
#include <stdlib.h>
#include <unistd.h>

#include "libqtest.h"
#include "qemu/bswap.h"

typedef struct TestCase TestCase;
+3 −4
Original line number Diff line number Diff line
@@ -10,15 +10,14 @@
 * See the COPYING file in the top-level directory.
 */

#define NO_QEMU_PROTOS
#include <string.h>
#include <glib.h>

#include "libqtest.h"
#define NO_QEMU_PROTOS
#include "hw/nvram/fw_cfg.h"
#include "libqos/fw_cfg.h"

#include <string.h>
#include <glib.h>

static uint64_t ram_size = 128 << 20;
static uint16_t nb_cpus = 1;
static uint16_t max_cpus = 1;
+5 −6
Original line number Diff line number Diff line
@@ -12,12 +12,6 @@
 * See the COPYING file in the top-level directory.
 */

#include "libqos/pci.h"
#include "libqos/pci-pc.h"
#include "libqtest.h"

#include "hw/pci/pci_regs.h"

#include <glib.h>
#include <string.h>
#include <stdio.h>
@@ -26,6 +20,11 @@
#include <sys/mman.h>
#include <stdlib.h>

#include "libqtest.h"
#include "libqos/pci.h"
#include "libqos/pci-pc.h"
#include "hw/pci/pci_regs.h"

#define BROKEN 1

#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
+2 −1
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@
 * See the COPYING file in the top-level directory.
 *
 */
#include "libqtest.h"

#include <glib.h>
#include <stdio.h>
@@ -19,6 +18,8 @@
#include <stdlib.h>
#include <unistd.h>

#include "libqtest.h"

#define RTC_SECONDS             0x9
#define RTC_MINUTES             0xa
#define RTC_HOURS               0xb
+2 −1
Original line number Diff line number Diff line
@@ -6,10 +6,11 @@
 * This work is licensed under the terms of the GNU GPL, version 2 or later.
 * See the COPYING file in the top-level directory.
 */
#include "libqtest.h"

#include <glib.h>
#include <string.h>

#include "libqtest.h"
#include "qemu/osdep.h"
#include "qapi/qmp/types.h"

Loading