aboutsummaryrefslogtreecommitdiff
path: root/sim/common
diff options
context:
space:
mode:
authorOrgad Shaneh <orgads@gmail.com>2021-10-28 09:07:46 +0000
committerMike Frysinger <vapier@gentoo.org>2021-10-30 23:50:09 -0400
commit1352aabb238dc0f21097b753d6fdb931e533db41 (patch)
treeb0759c19c45b6089730fc2624cf73beb0c120768 /sim/common
parent590abc168fb25908cde1df89f4905b575c14e55d (diff)
downloadgdb-1352aabb238dc0f21097b753d6fdb931e533db41.zip
gdb-1352aabb238dc0f21097b753d6fdb931e533db41.tar.gz
gdb-1352aabb238dc0f21097b753d6fdb931e533db41.tar.bz2
sim: fix compilation on mingw64 [PR sim/28476]
...by reordering includes. 1. sim-utils.c sim/mips/sim-main.h defines UserMode, while there is a struct in winnt.h which has UserMode as a member. So if sim-main.h is included before winnt.h, compilation fails. 2. ppc registers.h defines CR, which is used as a member in winnt.h. winsock2.h is included by sys/time.h, so sys/time.h has to be included before registers.h. Bug: https://sourceware.org/PR28476
Diffstat (limited to 'sim/common')
-rw-r--r--sim/common/sim-utils.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c
index 380afd0..88fd20e 100644
--- a/sim/common/sim-utils.c
+++ b/sim/common/sim-utils.c
@@ -20,9 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* This must come before any other includes. */
#include "defs.h"
-#include "sim-main.h"
-#include "sim-assert.h"
-
#include <stdlib.h>
#include <time.h>
#include <sys/time.h> /* needed by sys/resource.h */
@@ -34,6 +31,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "libiberty.h"
#include "bfd.h"
+#include "sim-main.h"
+#include "sim-assert.h"
#include "sim-utils.h"
/* Allocate zero filled memory with xcalloc - xcalloc aborts if the