diff --git a/patches/mlibc/sysdeps.patch b/patches/mlibc/sysdeps.patch index 5eec832f..b767cf4a 100644 --- a/patches/mlibc/sysdeps.patch +++ b/patches/mlibc/sysdeps.patch @@ -1,6 +1,6 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/crt-x86_64/crt0.S mlibc/sysdeps/astral/crt-x86_64/crt0.S --- mlibc-3.0.0-rc1/sysdeps/astral/crt-x86_64/crt0.S 1969-12-31 21:00:00.000000000 -0300 -+++ mlibc/sysdeps/astral/crt-x86_64/crt0.S 2022-09-21 16:39:16.115549200 -0300 ++++ mlibc/sysdeps/astral/crt-x86_64/crt0.S 2022-09-21 18:37:56.035233535 -0300 @@ -0,0 +1,7 @@ + +.section .text @@ -11,7 +11,7 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/crt-x86_64/crt0.S mlib + diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/astral.cpp mlibc/sysdeps/astral/generic/astral.cpp --- mlibc-3.0.0-rc1/sysdeps/astral/generic/astral.cpp 1969-12-31 21:00:00.000000000 -0300 -+++ mlibc/sysdeps/astral/generic/astral.cpp 2022-09-21 16:39:16.115549200 -0300 ++++ mlibc/sysdeps/astral/generic/astral.cpp 2022-09-21 18:37:56.035233535 -0300 @@ -0,0 +1,6 @@ +#include + @@ -21,7 +21,7 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/astral.cpp mli +} diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/entry.cpp mlibc/sysdeps/astral/generic/entry.cpp --- mlibc-3.0.0-rc1/sysdeps/astral/generic/entry.cpp 1969-12-31 21:00:00.000000000 -0300 -+++ mlibc/sysdeps/astral/generic/entry.cpp 2022-09-21 16:39:16.115549200 -0300 ++++ mlibc/sysdeps/astral/generic/entry.cpp 2022-09-21 18:37:56.035233535 -0300 @@ -0,0 +1,34 @@ + +#include @@ -59,7 +59,7 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/entry.cpp mlib + diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/generic.cpp mlibc/sysdeps/astral/generic/generic.cpp --- mlibc-3.0.0-rc1/sysdeps/astral/generic/generic.cpp 1969-12-31 21:00:00.000000000 -0300 -+++ mlibc/sysdeps/astral/generic/generic.cpp 2022-09-21 16:59:53.195494350 -0300 ++++ mlibc/sysdeps/astral/generic/generic.cpp 2022-09-21 19:25:33.425106934 -0300 @@ -0,0 +1,184 @@ +#include +#include @@ -224,7 +224,7 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/generic.cpp ml + case fsfd_target::path: + return syscall(SYSCALL_STAT, &ret, (uint64_t)path, (uint64_t)statbuf); + case fsfd_target::fd: -+ return syscall(SYSCALL_FSTAT, &ret, (uint64_t)path, (uint64_t)statbuf); ++ return syscall(SYSCALL_FSTAT, &ret, fd, (uint64_t)statbuf); + default: + sys_libc_log("libc: sys_stat: Unknown fsfd target"); + return ENOSYS; @@ -247,7 +247,7 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/generic.cpp ml + diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/include/astral/archctl.h mlibc/sysdeps/astral/include/astral/archctl.h --- mlibc-3.0.0-rc1/sysdeps/astral/include/astral/archctl.h 1969-12-31 21:00:00.000000000 -0300 -+++ mlibc/sysdeps/astral/include/astral/archctl.h 2022-09-21 16:39:16.115549200 -0300 ++++ mlibc/sysdeps/astral/include/astral/archctl.h 2022-09-21 18:37:56.035233535 -0300 @@ -0,0 +1,11 @@ +#ifndef _ASTRAL_SYSCALL_ARCHCTL_INCLUDE +#define _ASTRAL_SYSCALL_ARCHCTL_INCLUDE @@ -262,7 +262,7 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/include/astral/archctl +#endif diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/include/astral/syscall.h mlibc/sysdeps/astral/include/astral/syscall.h --- mlibc-3.0.0-rc1/sysdeps/astral/include/astral/syscall.h 1969-12-31 21:00:00.000000000 -0300 -+++ mlibc/sysdeps/astral/include/astral/syscall.h 2022-09-21 16:39:16.115549200 -0300 ++++ mlibc/sysdeps/astral/include/astral/syscall.h 2022-09-21 18:37:56.035233535 -0300 @@ -0,0 +1,41 @@ +#ifndef _SYSCALL_H_INCLUDE +#define _SYSCALL_H_INCLUDE @@ -307,7 +307,7 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/include/astral/syscall +#endif diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/meson.build mlibc/sysdeps/astral/meson.build --- mlibc-3.0.0-rc1/sysdeps/astral/meson.build 1969-12-31 21:00:00.000000000 -0300 -+++ mlibc/sysdeps/astral/meson.build 2022-09-21 16:57:16.082167989 -0300 ++++ mlibc/sysdeps/astral/meson.build 2022-09-21 18:37:56.035233535 -0300 @@ -0,0 +1,63 @@ + +rtdl_sources += files(