about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2024-05-12 15:33:15 -0400
committerRich Felker <dalias@aerifal.cx>2024-05-12 15:33:15 -0400
commit007997299248b8682dcbb73595c53dfe86071c83 (patch)
tree15f1ddf4ca823b43f7f62a61621dd941443b9586
parentcbf59dd662cea8786c2f3a5ea21f8da64f002b30 (diff)
downloadmusl-master.tar.gz
musl-master.tar.xz
musl-master.zip
fix mismatched type in posix_getdents definition HEAD master
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.
-rw-r--r--src/dirent/posix_getdents.c2
1 files changed, 1 insertions, 1 deletions
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 <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;