public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Add missing includes.
@ 2019-03-25 15:44 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2019-03-25 15:44 UTC (permalink / raw)
To: newlib-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=e8b23909e4f458b923595872719523b2293bd74e
commit e8b23909e4f458b923595872719523b2293bd74e
Author: Andrew Stubbs <ams@codesourcery.com>
Date: Mon Mar 25 15:33:53 2019 +0000
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.
Diff:
---
newlib/libc/machine/amdgcn/abort.c | 2 +-
newlib/libc/machine/amdgcn/getreent.c | 1 +
newlib/libc/sys/amdgcn/fstat.c | 2 ++
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/newlib/libc/machine/amdgcn/abort.c b/newlib/libc/machine/amdgcn/abort.c
index ccbca72..ca9a0a3 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 acf10a9..5a28aa4 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 b787158..2526967 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>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-03-25 15:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-25 15:44 [newlib-cygwin] Add missing includes Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).