* [musl] [PATCH] fix function return type for posix_getdents
@ 2024-05-12 18:01 psykose
2024-05-12 18:15 ` alice
2024-05-12 22:50 ` Rich Felker
0 siblings, 2 replies; 3+ messages in thread
From: psykose @ 2024-05-12 18:01 UTC (permalink / raw)
To: musl
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
--
2.45.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [musl] [PATCH] fix function return type for posix_getdents
2024-05-12 18:01 [musl] [PATCH] fix function return type for posix_getdents psykose
@ 2024-05-12 18:15 ` alice
2024-05-12 22:50 ` Rich Felker
1 sibling, 0 replies; 3+ messages in thread
From: alice @ 2024-05-12 18:15 UTC (permalink / raw)
To: musl
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [musl] [PATCH] fix function return type for posix_getdents
2024-05-12 18:01 [musl] [PATCH] fix function return type for posix_getdents psykose
2024-05-12 18:15 ` alice
@ 2024-05-12 22:50 ` Rich Felker
1 sibling, 0 replies; 3+ messages in thread
From: Rich Felker @ 2024-05-12 22:50 UTC (permalink / raw)
To: psykose; +Cc: musl
On Sun, May 12, 2024 at 06:01:16PM +0000, 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
> --
> 2.45.0
Thanks. I didn't see your email first and already pushed a fix based
on discussion on IRC.
Rich
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-12 22:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-12 18:01 [musl] [PATCH] fix function return type for posix_getdents psykose
2024-05-12 18:15 ` alice
2024-05-12 22:50 ` Rich Felker
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).