sim: or1k: fix include ordering with sim-main.h
authorMike Frysinger <vapier@gentoo.org>
Sat, 9 Jan 2021 19:10:20 +0000 (14:10 -0500)
committerMike Frysinger <vapier@gentoo.org>
Mon, 11 Jan 2021 13:29:18 +0000 (08:29 -0500)
Make sure config.h is included before C library headers otherwise the
later libiberty.h include gets confused about asprintf state leading
to warnings like:
common/sim-utils.c:330:9:
warning: implicit declaration of function 'vasprintf';
did you mean 'xvasprintf'? [-Wimplicit-function-declaration]

sim/or1k/ChangeLog
sim/or1k/sim-main.h

index 89cf42a64259bd1602bca6f31ed464d4df34e7f0..1b7e6e2c1777e2e860c8a888d5807bff86b47658 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * sim-main.h: Include config.h.
+
 2021-01-11  Mike Frysinger  <vapier@gentoo.org>
 
        * config.in, configure: Regenerate.
index f91a351a2db1b0df8eeddd6ade39a2388f621f3e..cac1abb2b8fbafb913947613315535b1ec9d31fd 100644 (file)
@@ -21,6 +21,8 @@
 
 #define WITH_SCACHE_PBB 1
 
+#include "config.h"
+
 #include "ansidecl.h"
 #include "or1k-desc.h"
 #include "sim-basics.h"