diff options
author | Rich Felker <dalias@aerifal.cx> | 2024-05-12 15:33:15 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2024-05-12 15:33:15 -0400 |
commit | 007997299248b8682dcbb73595c53dfe86071c83 (patch) | |
tree | 15f1ddf4ca823b43f7f62a61621dd941443b9586 /src/dirent/posix_getdents.c | |
parent | cbf59dd662cea8786c2f3a5ea21f8da64f002b30 (diff) | |
download | musl-007997299248b8682dcbb73595c53dfe86071c83.zip musl-007997299248b8682dcbb73595c53dfe86071c83.tar.gz musl-007997299248b8682dcbb73595c53dfe86071c83.tar.bz2 |
fix mismatched type in posix_getdents definition
commit 1b0d48517f816e98f19111df82f32bfc1608ecec wrongly copied the
getdents return type of int rather than matching the ssize_t used by
posix_getdents. this was overlooked in testing on 32-bit archs but
obviously broke 64-bit archs.
Diffstat (limited to 'src/dirent/posix_getdents.c')
-rw-r--r-- | src/dirent/posix_getdents.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dirent/posix_getdents.c b/src/dirent/posix_getdents.c index b19e812..26c16ac 100644 --- a/src/dirent/posix_getdents.c +++ b/src/dirent/posix_getdents.c @@ -3,7 +3,7 @@ #include <errno.h> #include "syscall.h" -int posix_getdents(int fd, void *buf, size_t len, int flags) +ssize_t posix_getdents(int fd, void *buf, size_t len, int flags) { if (flags) return __syscall_ret(-EOPNOTSUPP); if (len>INT_MAX) len = INT_MAX; |