From 9416af6e7d5d421b0c737d7f80afd67ce9926f11 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 4 Jan 2021 20:11:48 -0500 Subject: [PATCH] sim: stdlib.h for abs() Make sure the files using abs() include stdlib.h for its prototype. These files were relying on it being included implicitly by others which isn't guaranteed, and newer toolchains produce warnings. --- sim/arm/ChangeLog | 4 ++++ sim/arm/iwmmxt.c | 1 + sim/bfin/ChangeLog | 4 ++++ sim/bfin/dv-bfin_dma.c | 2 ++ sim/testsuite/sim/bfin/ChangeLog | 4 ++++ sim/testsuite/sim/bfin/mdma-skel.h | 1 + 6 files changed, 16 insertions(+) diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index 9d98bcd839a..75fcec27c6d 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,7 @@ +2021-01-04 Mike Frysinger + + * iwmmxt.c: Include stdlib.h. + 2021-01-04 Mike Frysinger * configure: Regenerate. diff --git a/sim/arm/iwmmxt.c b/sim/arm/iwmmxt.c index 0362cf07ab4..8e818248645 100644 --- a/sim/arm/iwmmxt.c +++ b/sim/arm/iwmmxt.c @@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include #include #include "armdefs.h" diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index d82bc5ee742..b000b82d7b9 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,7 @@ +2021-01-04 Mike Frysinger + + * dv-bfin_dma.c: Include stdlib.h. + 2021-01-02 Mike Frysinger * interp.c: Change ALIGN to align_up. diff --git a/sim/bfin/dv-bfin_dma.c b/sim/bfin/dv-bfin_dma.c index 06fe5ed738b..e3834d76143 100644 --- a/sim/bfin/dv-bfin_dma.c +++ b/sim/bfin/dv-bfin_dma.c @@ -20,6 +20,8 @@ #include "config.h" +#include + #include "sim-main.h" #include "devices.h" #include "hw-device.h" diff --git a/sim/testsuite/sim/bfin/ChangeLog b/sim/testsuite/sim/bfin/ChangeLog index 4fc604f9af6..b8fdc047234 100644 --- a/sim/testsuite/sim/bfin/ChangeLog +++ b/sim/testsuite/sim/bfin/ChangeLog @@ -1,3 +1,7 @@ +2021-01-04 Mike Frysinger + + * mdma-skel.h: Include stdlib.h. + 2015-10-11 Mike Frysinger PR sim/18407 diff --git a/sim/testsuite/sim/bfin/mdma-skel.h b/sim/testsuite/sim/bfin/mdma-skel.h index 399cddc9559..920eff27116 100644 --- a/sim/testsuite/sim/bfin/mdma-skel.h +++ b/sim/testsuite/sim/bfin/mdma-skel.h @@ -1,3 +1,4 @@ +#include #include void _mdma_memcpy (bu32 dst, bu32 src, bu32 size, bs16 mod) -- 2.30.2