From 007997299248b8682dcbb73595c53dfe86071c83 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 12 May 2024 15:33:15 -0400 Subject: 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. --- src/dirent/posix_getdents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dirent') diff --git a/src/dirent/posix_getdents.c b/src/dirent/posix_getdents.c index b19e8127..26c16ac6 100644 --- a/src/dirent/posix_getdents.c +++ b/src/dirent/posix_getdents.c @@ -3,7 +3,7 @@ #include #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; -- cgit 1.4.1