|
Message-Id: <D17VD9GKTGVN.1HMO0EROOIBFT@ayaya.dev> Date: Sun, 12 May 2024 18:15:21 +0000 From: "alice" <alice@...ya.dev> To: <musl@...ts.openwall.com> Subject: Re: [PATCH] fix function return type for posix_getdents On Sun May 12, 2024 at 6:01 PM UTC, psykose wrote: > mistakenly doesn't match the prototype from > 1b0d48517f816e98f19111df82f32bfc1608ecec > --- > src/dirent/posix_getdents.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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; > > base-commit: 84015cee177e835db5e65bd34b60635f2a5a5056 to be exact- clang 18 refuses to compile this otherwise: /builddir/musl-1.2.5_git20240511/src/dirent/posix_getdents.c:6:5: error: conflicting types for 'posix_getdents' 6 | int posix_getdents(int fd, void *buf, size_t len, int flags) | ^ /builddir/musl-1.2.5_git20240511/include/dirent.h:41:9: note: previous declaration is here 41 | ssize_t posix_getdents(int, void *, size_t, int); | ^ 1 error generated.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.