From: Mike Frysinger Date: Sat, 9 Jan 2021 19:10:20 +0000 (-0500) Subject: sim: or1k: fix include ordering with sim-main.h X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a0c38f0d705129e14c025de814d7fd619edde650;p=binutils-gdb.git 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] --- 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"