From 20a8e078cc573f85f7262f7b87be3cf8e8a6424f Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sat, 4 Dec 2021 20:24:55 -0500
Subject: sim: reorder header includes

We're including system headers after local headers in a bunch of
places, but this leads to conflicts when our local headers happen
to define symbols that show up in the system headers.

Use the more standard order of:
* config.h (via defs.h)
* system headers
* local library headers (e.g. bfd & libiberty)
* sim specific headers
---
 sim/common/sim-io.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

(limited to 'sim/common/sim-io.c')

diff --git a/sim/common/sim-io.c b/sim/common/sim-io.c
index 9fdc79e..5a47f65 100644
--- a/sim/common/sim-io.c
+++ b/sim/common/sim-io.c
@@ -22,20 +22,18 @@
 /* This must come before any other includes.  */
 #include "defs.h"
 
-#include "sim-main.h"
-#include "sim-io.h"
-#include "sim/callback.h"
-
 #include <errno.h>
 #if HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
-
+#include <stdlib.h>
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 
-#include <stdlib.h>
+#include "sim-main.h"
+#include "sim-io.h"
+#include "sim/callback.h"
 
 #undef open
 
-- 
cgit v1.1