aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc <dkm+newlib@kataplop.net>2024-05-05 21:16:01 +0200
committerJeff Johnston <jjohnstn@redhat.com>2024-05-06 19:17:13 -0400
commit4becae7bd833e183c789821a477f25898ed0db1f (patch)
treede9d5cae48920425353d05910abe2d3bb908b708
parent730703bdb8e1ae671517efaa0b9e273eef52d724 (diff)
downloadnewlib-4becae7bd833e183c789821a477f25898ed0db1f.zip
newlib-4becae7bd833e183c789821a477f25898ed0db1f.tar.gz
newlib-4becae7bd833e183c789821a477f25898ed0db1f.tar.bz2
libgloss: fix read and write prototype
Use _READ_WRITE_RETURN_TYPE for read/write in libgloss/{read,write}.c to avoid mismatching types. Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
-rw-r--r--libgloss/read.c2
-rw-r--r--libgloss/write.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libgloss/read.c b/libgloss/read.c
index 83a3b54..8676482 100644
--- a/libgloss/read.c
+++ b/libgloss/read.c
@@ -20,7 +20,7 @@ extern char inbyte (void);
* read -- read bytes from the serial port. Ignore fd, since
* we only have stdin.
*/
-int
+_READ_WRITE_RETURN_TYPE
read (int fd,
void *buf_,
size_t nbytes)
diff --git a/libgloss/write.c b/libgloss/write.c
index 80bcd4a..7571412 100644
--- a/libgloss/write.c
+++ b/libgloss/write.c
@@ -21,7 +21,7 @@ extern int outbyte (char x);
* stdout and stderr are the same. Since we have no filesystem,
* open will only return an error.
*/
-int
+_READ_WRITE_RETURN_TYPE
write (int fd,
const void *buf_,
size_t nbytes)