Correctly handle __fcntl_compat symbol for the !SYSCALL_COMPAT case.

Both .weak and .alias assembler directives only work when assembling
the file which defines the symbol.

Reported and tested by:	andrew
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2015-04-01 16:55:30 +00:00
parent f2c2231e0c
commit 1849df3006
2 changed files with 9 additions and 3 deletions

View File

@ -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__ */

View File

@ -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