sim: pru: fix include ordering with sim-main.h
authorMike Frysinger <vapier@gentoo.org>
Sat, 9 Jan 2021 08:01:05 +0000 (03:01 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 9 Jan 2021 13:43:48 +0000 (08:43 -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/pru/ChangeLog
sim/pru/sim-main.h

index 4bcb118f8ef19127a2e867f4da1c8357f9dab73e..0b37812439f07bc7a9f0f27cf6dd72cdcf32166a 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-09  Mike Frysinger  <vapier@gentoo.org>
+
+       * sim-main.h: Include config.h.
+
 2021-01-08  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 8233c20cefd7c2a4195dabcf6b3eddd7d626e1db..966cacf5693d4954e514f4ff0b60199cb7648d9a 100644 (file)
@@ -19,6 +19,8 @@
 #ifndef PRU_SIM_MAIN
 #define PRU_SIM_MAIN
 
+#include "config.h"
+
 #include <stdint.h>
 #include <stddef.h>
 #include "pru.h"