From f41464416a1744ca0151d61de1a7e405664dd9b7 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 9 Jan 2021 03:01:05 -0500 Subject: [PATCH] sim: pru: fix include ordering with sim-main.h 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 | 4 ++++ sim/pru/sim-main.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog index 4bcb118f8ef..0b37812439f 100644 --- a/sim/pru/ChangeLog +++ b/sim/pru/ChangeLog @@ -1,3 +1,7 @@ +2021-01-09 Mike Frysinger + + * sim-main.h: Include config.h. + 2021-01-08 Mike Frysinger * configure: Regenerate. diff --git a/sim/pru/sim-main.h b/sim/pru/sim-main.h index 8233c20cefd..966cacf5693 100644 --- a/sim/pru/sim-main.h +++ b/sim/pru/sim-main.h @@ -19,6 +19,8 @@ #ifndef PRU_SIM_MAIN #define PRU_SIM_MAIN +#include "config.h" + #include #include #include "pru.h" -- 2.30.2