From a0c38f0d705129e14c025de814d7fd619edde650 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 9 Jan 2021 14:10:20 -0500 Subject: 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(+) (limited to 'sim/or1k') diff --git a/sim/or1k/ChangeLog b/sim/or1k/ChangeLog index 89cf42a..1b7e6e2 100644 --- a/sim/or1k/ChangeLog +++ b/sim/or1k/ChangeLog @@ -1,5 +1,9 @@ 2021-01-11 Mike Frysinger + * sim-main.h: Include config.h. + +2021-01-11 Mike Frysinger + * config.in, configure: Regenerate. * sim-if.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H, and strings.h include. diff --git a/sim/or1k/sim-main.h b/sim/or1k/sim-main.h index f91a351..cac1abb 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" -- cgit v1.1