public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Add missing includes. Date: Mon, 25 Mar 2019 15:44:00 -0000 [thread overview] Message-ID: <20190325154441.59711.qmail@sourceware.org> (raw) 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>
reply other threads:[~2019-03-25 15:44 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190325154441.59711.qmail@sourceware.org \ --to=corinna@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).