diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Runtime/POSIX/FD_Fail2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/Runtime/POSIX/FD_Fail2.c b/test/Runtime/POSIX/FD_Fail2.c index c2e5596b..9d7e358f 100644 --- a/test/Runtime/POSIX/FD_Fail2.c +++ b/test/Runtime/POSIX/FD_Fail2.c @@ -18,7 +18,8 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#include <stdio.h> +#include <string.h> +#include <unistd.h> int main(int argc, char** argv) { char buf[1024]; @@ -28,7 +29,7 @@ int main(int argc, char** argv) { int r; - r = read(fd, buf, 1, 5); + r = read(fd, buf, 5); if (r != -1) printf("read() succeeded %u\n", fd); else printf("read() failed with error '%s'\n", strerror(errno)); |