diff --git a/src/internal/procfdname.c b/src/internal/procfdname.c index 697e0bdc2e1f6a2ae212f70a5915b99cc35d1dfd..fd7306ab69a821746cfa58a376c7344bea6a8c39 100644 --- a/src/internal/procfdname.c +++ b/src/internal/procfdname.c @@ -1,3 +1,5 @@ +#include "syscall.h" + void __procfdname(char *buf, unsigned fd) { unsigned i, j; diff --git a/src/internal/syscall.h b/src/internal/syscall.h index c12a46cdbcfb9a641924257b8894c4ac1d150914..5737f3a25f014559f4cb01d184dd7b823f9d5066 100644 --- a/src/internal/syscall.h +++ b/src/internal/syscall.h @@ -244,4 +244,6 @@ hidden long __syscall_ret(unsigned long), __syscall(syscall_arg_t, ...), #define __sys_open_cp(...) __SYSCALL_DISP(__sys_open_cp,,__VA_ARGS__) #define sys_open_cp(...) __syscall_ret(__sys_open_cp(__VA_ARGS__)) +void __procfdname(char [static 15+3*sizeof(int)], unsigned); + #endif diff --git a/src/misc/realpath.c b/src/misc/realpath.c index 88c849cda33de1e285a5b1eec7dfe9c222d013e5..d2708e59da426b8d7210cd540f6a786e11c3e6f2 100644 --- a/src/misc/realpath.c +++ b/src/misc/realpath.c @@ -7,8 +7,6 @@ #include #include "syscall.h" -void __procfdname(char *, unsigned); - char *realpath(const char *restrict filename, char *restrict resolved) { int fd; diff --git a/src/process/fexecve.c b/src/process/fexecve.c index 8be3f760ff7ad8ef5df760fc40a46ec3d722be3a..554c1981b670f294b999295626e37b8bc5fc0b28 100644 --- a/src/process/fexecve.c +++ b/src/process/fexecve.c @@ -4,8 +4,6 @@ #include #include "syscall.h" -void __procfdname(char *, unsigned); - int fexecve(int fd, char *const argv[], char *const envp[]) { int r = __syscall(SYS_execveat, fd, "", argv, envp, AT_EMPTY_PATH); diff --git a/src/stat/fchmod.c b/src/stat/fchmod.c index 93e1b64c57f9046b5446292360f1564611307db7..7a503eefc46efbee86e018202cb19fb2f2fd0271 100644 --- a/src/stat/fchmod.c +++ b/src/stat/fchmod.c @@ -3,8 +3,6 @@ #include #include "syscall.h" -void __procfdname(char *, unsigned); - int fchmod(int fd, mode_t mode) { int ret = __syscall(SYS_fchmod, fd, mode); diff --git a/src/stat/fchmodat.c b/src/stat/fchmodat.c index d94667aed5e1a4aa1e924bd89a8ba3aa3ec6aa16..be61bdf3b224ee5002b222dd19e0702ef4558dc5 100644 --- a/src/stat/fchmodat.c +++ b/src/stat/fchmodat.c @@ -3,8 +3,6 @@ #include #include "syscall.h" -void __procfdname(char *, unsigned); - int fchmodat(int fd, const char *path, mode_t mode, int flag) { if (!flag) return syscall(SYS_fchmodat, fd, path, mode, flag); diff --git a/src/stat/fstat.c b/src/stat/fstat.c index ab4afc0f9220cc53951630128e6b8f8ac295b842..f6d165223556e6ccc3d98c5c2052fb6e22efbc71 100644 --- a/src/stat/fstat.c +++ b/src/stat/fstat.c @@ -4,8 +4,6 @@ #include "syscall.h" #include "libc.h" -void __procfdname(char *, unsigned); - int fstat(int fd, struct stat *st) { int ret = __syscall(SYS_fstat, fd, st); diff --git a/src/unistd/fchdir.c b/src/unistd/fchdir.c index 72c3915eee095964e0f161183ccfcff28862a47a..dee45ba68e6425a17fe2ef4f4b77038666e43d80 100644 --- a/src/unistd/fchdir.c +++ b/src/unistd/fchdir.c @@ -3,8 +3,6 @@ #include #include "syscall.h" -void __procfdname(char *, unsigned); - int fchdir(int fd) { int ret = __syscall(SYS_fchdir, fd); diff --git a/src/unistd/fchown.c b/src/unistd/fchown.c index 75075eecea58b057a7619db66355636b2c21fefe..737b3672fcce506ec079ca819b2e91bd9eb872a9 100644 --- a/src/unistd/fchown.c +++ b/src/unistd/fchown.c @@ -3,8 +3,6 @@ #include #include "syscall.h" -void __procfdname(char *, unsigned); - int fchown(int fd, uid_t uid, gid_t gid) { int ret = __syscall(SYS_fchown, fd, uid, gid); diff --git a/src/unistd/ttyname_r.c b/src/unistd/ttyname_r.c index 33aa4ae1a73672f87307b1bd9aababf7508b8e98..cb364c2913b442934304ac95d8fea48f01b80052 100644 --- a/src/unistd/ttyname_r.c +++ b/src/unistd/ttyname_r.c @@ -1,8 +1,7 @@ #include #include #include - -void __procfdname(char *, unsigned); +#include "syscall.h" int ttyname_r(int fd, char *name, size_t size) {