From: Tom de Vries Date: Mon, 10 Aug 2020 15:26:09 +0000 (+0200) Subject: [sim] Fix mbuild build breaker in sim-cpu.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3f8962bdb903bf8bc37935c189b3b32ad667c0b;p=binutils-gdb.git [sim] Fix mbuild build breaker in sim-cpu.c When running gdb/gdb_mbuild.sh, I run into: ... src/sim/aarch64/../common/sim-cpu.c: In function 'sim_cpu_free': src/sim/aarch64/../common/sim-cpu.c:64:3: error: implicit declaration of \ function 'free' [-Werror=implicit-function-declaration] free (cpu); ^~~~ src/sim/aarch64/../common/sim-cpu.c:64:3: error: incompatible implicit \ declaration of built-in function 'free' [-Werror] src/sim/aarch64/../common/sim-cpu.c:64:3: note: include '' or \ provide a declaration of 'free' ... Fix this by adding "#include ". Tested by gdb/gdb_mbuild.sh -e aarch64-elf. sim/common/ChangeLog: 2020-08-10 Tom de Vries * sim-cpu.c: Include stdlib.h for free. --- diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index a1ac3f13d41..2c71b135904 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,7 @@ +2020-08-10 Tom de Vries + + * sim-cpu.c: Include stdlib.h for free. + 2020-01-19 Simon Marchi * nrun.c: Include stdlib.h. diff --git a/sim/common/sim-cpu.c b/sim/common/sim-cpu.c index 1715508e2ff..d1676d48313 100644 --- a/sim/common/sim-cpu.c +++ b/sim/common/sim-cpu.c @@ -17,6 +17,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include + #include "sim-main.h" #include "bfd.h"