Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2019-03-25 18:33:53 +0300
committerCorinna Vinschen <corinna@vinschen.de>2019-03-25 18:44:10 +0300
commite8b23909e4f458b923595872719523b2293bd74e (patch)
tree75935de16127027fafb4ab2bcb35da84fc2e0ef2
parent23bb2f660807bbc7321a143fa35ce659d79ba245 (diff)
Add missing includes.
These missing includes were causing build warnings, but also a real bug in which the "size" parameter to "write" was being passed in 32-bit, whereas it ought to be 64-bit. This led to intermittent bad behaviour.
-rw-r--r--newlib/libc/machine/amdgcn/abort.c2
-rw-r--r--newlib/libc/machine/amdgcn/getreent.c1
-rw-r--r--newlib/libc/sys/amdgcn/fstat.c2
3 files changed, 4 insertions, 1 deletions
diff --git a/newlib/libc/machine/amdgcn/abort.c b/newlib/libc/machine/amdgcn/abort.c
index ccbca726a..ca9a0a33f 100644
--- a/newlib/libc/machine/amdgcn/abort.c
+++ b/newlib/libc/machine/amdgcn/abort.c
@@ -13,7 +13,7 @@
* they apply.
*/
-#include <stdlib.h>
+#include <unistd.h>
#include <signal.h>
#include "exit-value.h"
diff --git a/newlib/libc/machine/amdgcn/getreent.c b/newlib/libc/machine/amdgcn/getreent.c
index acf10a97f..5a28aa406 100644
--- a/newlib/libc/machine/amdgcn/getreent.c
+++ b/newlib/libc/machine/amdgcn/getreent.c
@@ -3,6 +3,7 @@
#include <reent.h>
#include <stdint.h>
#include <stdlib.h>
+#include <unistd.h>
/* Copied from the HSA documentation. */
typedef struct hsa_signal_s {
diff --git a/newlib/libc/sys/amdgcn/fstat.c b/newlib/libc/sys/amdgcn/fstat.c
index b78715857..2526967ef 100644
--- a/newlib/libc/sys/amdgcn/fstat.c
+++ b/newlib/libc/sys/amdgcn/fstat.c
@@ -13,6 +13,8 @@
* they apply.
*/
+#include <sys/types.h>
+#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>