@@ -15,78 +15,3 @@ index 3474615..d06f130 100644
1515 }
1616
1717 char **backtrace_symbols(void *const *, int) {
18- diff --git mlibc-clean/sysdeps/aero/generic/filesystem.cpp mlibc-workdir/sysdeps/aero/generic/filesystem.cpp
19- index b9a812b..95c49b9 100644
20- --- mlibc-clean/sysdeps/aero/generic/filesystem.cpp
21- +++ mlibc-workdir/sysdeps/aero/generic/filesystem.cpp
22- @@ -89,23 +89,24 @@ int sys_close(int fd) {
23- return 0;
24- }
25-
26- - int sys_access(const char *filename, int mode) {
27- - auto result =
28- - syscall(SYS_ACCESS, AT_FDCWD, filename, strlen(filename), mode, 0);
29- -
30- - if (result < 0) {
31- - return -result;
32- - }
33- -
34- + int sys_faccessat(int dirfd, const char *pathname, int mode, int flags) {
35- + auto ret = syscall(SYS_ACCESS, dirfd, pathname, strlen(pathname), mode, flags);
36- + if(int e = sc_error(ret); e)
37- + return e;
38- return 0;
39- }
40-
41- + int sys_access(const char *filename, int mode) {
42- + return sys_faccessat(AT_FDCWD, filename, mode, 0);
43- + }
44- +
45- int sys_stat(fsfd_target fsfdt, int fd, const char *path, int flags,
46- struct stat *statbuf) {
47- switch (fsfdt) {
48- case fsfd_target::path:
49- fd = AT_FDCWD;
50- break;
51- +
52- case fsfd_target::fd:
53- flags |= AT_EMPTY_PATH;
54-
55- @@ -199,14 +200,14 @@ int sys_rmdir(const char *path) {
56- }
57-
58- int sys_unlinkat(int fd, const char *path, int flags) {
59- - auto ret = syscall(SYS_UNLINK, fd, path, strlen(path), flags);
60- - if (int e = sc_error(ret); e)
61- - return e;
62- - return 0;
63- + auto ret = syscall(SYS_UNLINK, fd, path, strlen(path), flags);
64- + if (int e = sc_error(ret); e)
65- + return e;
66- + return 0;
67- }
68-
69- int sys_symlink(const char *target_path, const char *link_path) {
70- - return sys_symlinkat(target_path, AT_FDCWD, link_path);
71- + return sys_symlinkat(target_path, AT_FDCWD, link_path);
72- }
73-
74- int sys_symlinkat(const char *target_path, int dirfd, const char *link_path) {
75- diff --git mlibc-clean/sysdeps/aero/include/abi-bits/fcntl.h mlibc-workdir/sysdeps/aero/include/abi-bits/fcntl.h
76- index ea5323a..463e2c9 120000
77- --- mlibc-clean/sysdeps/aero/include/abi-bits/fcntl.h
78- +++ mlibc-workdir/sysdeps/aero/include/abi-bits/fcntl.h
79- @@ -1 +1 @@
80- - ../../../../abis/mlibc/fcntl.h
81- \ No newline at end of file
82- + ../../../../abis/linux/fcntl.h
83- \ No newline at end of file
84- diff --git mlibc-clean/sysdeps/aero/include/abi-bits/stat.h mlibc-workdir/sysdeps/aero/include/abi-bits/stat.h
85- index 82642c3..1f63b41 120000
86- --- mlibc-clean/sysdeps/aero/include/abi-bits/stat.h
87- +++ mlibc-workdir/sysdeps/aero/include/abi-bits/stat.h
88- @@ -1 +1 @@
89- - ../../../../abis/mlibc/stat.h
90- \ No newline at end of file
91- + ../../../../abis/linux/stat.h
92- \ No newline at end of file
0 commit comments