From a0c38f0d705129e14c025de814d7fd619edde650 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 9 Jan 2021 14:10:20 -0500 Subject: [PATCH] sim: or1k: 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/or1k/ChangeLog | 4 ++++ sim/or1k/sim-main.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/sim/or1k/ChangeLog b/sim/or1k/ChangeLog index 89cf42a6425..1b7e6e2c177 100644 --- a/sim/or1k/ChangeLog +++ b/sim/or1k/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger + + * sim-main.h: Include config.h. + 2021-01-11 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/or1k/sim-main.h b/sim/or1k/sim-main.h index f91a351a2db..cac1abb2b8f 100644 --- a/sim/or1k/sim-main.h +++ b/sim/or1k/sim-main.h @@ -21,6 +21,8 @@ #define WITH_SCACHE_PBB 1 +#include "config.h" + #include "ansidecl.h" #include "or1k-desc.h" #include "sim-basics.h" -- 2.30.2