diff options
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/include/compat.h | 9 | ||||
-rw-r--r-- | lib/libc/sys/fcntl.c | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/libc/include/compat.h b/lib/libc/include/compat.h index 7694540..2b8f0de 100644 --- a/lib/libc/include/compat.h +++ b/lib/libc/include/compat.h @@ -44,5 +44,14 @@ __sym_compat(shmctl, freebsd7_shmctl, FBSD_1.0); #undef __sym_compat +#define __weak_reference(sym,alias) \ + .weak alias;.equ alias,sym + +#ifndef SYSCALL_COMPAT +__weak_reference(__sys_fcntl,__fcntl_compat) +#endif + +#undef __weak_reference + #endif /* __LIBC_COMPAT_H__ */ diff --git a/lib/libc/sys/fcntl.c b/lib/libc/sys/fcntl.c index 4cb887b..7af617e 100644 --- a/lib/libc/sys/fcntl.c +++ b/lib/libc/sys/fcntl.c @@ -103,7 +103,4 @@ __fcntl_compat(int fd, int cmd, ...) return (__sys_fcntl(fd, cmd, arg)); } } -#else -__weak_reference(__sys_fcntl, __fcntl_compat); -__weak_reference(__sys_fcntl, __fcntl); #endif |