summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-01-04 20:11:48 -0500
committerMike Frysinger <vapier@gentoo.org>2021-01-04 20:13:10 -0500
commit9416af6e7d5d421b0c737d7f80afd67ce9926f11 (patch)
treefa47ab398240d1e0ed77ca9c57b2e0b029883087
parent9353bb9ed6ef1066850f31c6c8e1a40a7ca6763d (diff)
downloadbinutils-gdb-9416af6e7d5d421b0c737d7f80afd67ce9926f11.tar.gz
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.
-rw-r--r--sim/arm/ChangeLog4
-rw-r--r--sim/arm/iwmmxt.c1
-rw-r--r--sim/bfin/ChangeLog4
-rw-r--r--sim/bfin/dv-bfin_dma.c2
-rw-r--r--sim/testsuite/sim/bfin/ChangeLog4
-rw-r--r--sim/testsuite/sim/bfin/mdma-skel.h1
6 files changed, 16 insertions, 0 deletions
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index 9d98bcd839a..75fcec27c6d 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,5 +1,9 @@
2021-01-04 Mike Frysinger <vapier@gentoo.org>
+ * iwmmxt.c: Include stdlib.h.
+
+2021-01-04 Mike Frysinger <vapier@gentoo.org>
+
* configure: Regenerate.
2020-12-15 Nick Clifton <nickc@redhat.com>
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 <http://www.gnu.org/licenses/>. */
+#include <stdlib.h>
#include <string.h>
#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 <vapier@gentoo.org>
+
+ * dv-bfin_dma.c: Include stdlib.h.
+
2021-01-02 Mike Frysinger <vapier@gentoo.org>
* 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 <stdlib.h>
+
#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 <vapier@gentoo.org>
+
+ * mdma-skel.h: Include stdlib.h.
+
2015-10-11 Mike Frysinger <vapier@gentoo.org>
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 <stdlib.h>
#include <string.h>
void _mdma_memcpy (bu32 dst, bu32 src, bu32 size, bs16 mod)