summaryrefslogtreecommitdiff
path: root/src/libstddjb/fd_read.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/fd_read.c')
-rw-r--r--src/libstddjb/fd_read.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstddjb/fd_read.c b/src/libstddjb/fd_read.c
index 22a296b..9664024 100644
--- a/src/libstddjb/fd_read.c
+++ b/src/libstddjb/fd_read.c
@@ -1,12 +1,13 @@
/* ISC license. */
+#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <skalibs/allreadwrite.h>
-int fd_read (int fd, char *buf, unsigned int len)
+ssize_t fd_read (int fd, char *buf, size_t len)
{
- register int r ;
+ register ssize_t r ;
do r = read(fd, buf, len) ;
while ((r == -1) && (errno == EINTR)) ;
return r ;