From b760fb3a1cd35fda01843ee7cdb3e420f07d27b9 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sun, 19 Jan 2020 19:47:17 -0500 Subject: sim: add some stdlib.h includes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When trying to compile GDB with --target=avr, with gcc 9.2.0, I am getting a bunch of: /home/simark/src/binutils-gdb/sim/avr/../common/nrun.c:94:7: error: implicit declaration of function ‘abort’ [-Werror=implicit-function-declaration] 94 | abort (); | ^~~~~ /home/simark/src/binutils-gdb/sim/avr/../common/nrun.c:94:7: error: incompatible implicit declaration of built-in function ‘abort’ [-Werror] /home/simark/src/binutils-gdb/sim/avr/../common/nrun.c:94:7: note: include ‘’ or provide a declaration of ‘abort’ I did what the compiler told me and added the relevant includes in the problematic files. sim/common/ChangeLog: * nrun.c: Include stdlib.h. * sim-core.c: Likewise. * sim-engine.c: Likewise. * sim-io.c: Likewise. * sim-module.c: Likewise. * sim-reason.c: Likewise. --- sim/common/sim-io.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sim/common/sim-io.c') diff --git a/sim/common/sim-io.c b/sim/common/sim-io.c index 05ba018..989f9cf 100644 --- a/sim/common/sim-io.c +++ b/sim/common/sim-io.c @@ -33,6 +33,8 @@ #include #endif +#include + /* Define the rate at which the simulator should poll the host for a quit. */ #ifndef POLL_QUIT_INTERVAL -- cgit v1.1