Closed razvand closed 1 year ago
This works fine when using
getdents64
, but when you specifically callgetdents
,getdents64
get called instead because of this macro.This was an issue with the older version of this pr too, I just didn't catch it.
But that was the case at all times, right? I don't think it's a problem. Currently, the Musl functions (getdents
and getdents64
) and up calling SYS_getdents
/ uk_syscall_getdents
(NOT uk_syscall_getdents64
). So that's OK for this time.
So, I know it's messy, but it will be messy in all cases. And in all cases getdents
and getdents64
end up calling SYS_getdents
/ uk_syscall_getdents
.
We would focus on proper implementation for ..64
variants (cough you, @StefanJum cough) later on.
But anything we do now will not solve / improve this.
When defining
getdents64
as a macro aliasinggetdents
, the syscall shim layer complains.This patch uses a typical C-style declaration of
getdents64()
. This, combined with theLFS64(getdents)
, aliasing used insrc/dirent/__getdents.c
solves the issue with the syscall shim layer.The
getdents64
symbol is then provided to applications as an alias togetdents
, while theuk_syscall_getdents64
syscall is provided by Unikraft: