libthr does not obey WITHOUT_SYSCALL_COMPAT
davidxu at freebsd.org
Sun Mar 8 22:11:06 PDT 2009
Daniel Eischen wrote:
> On Mon, 9 Mar 2009, David Xu wrote:
>> Pawel Worach wrote:
>>> If libc is built using WITHOUT_SYSCALL_COMPAT applications linked with
>>> libthr end up having unresolved symbols since libthr references
>>> __fcntl_compat unconditionally.
>>> Here is a patch to make libthr also obey WITHOUT_SYSCALL_COMPAT
> I never got around to replying to this...
> I don't quite understand why __fcntl_compat is there. We have
> F_GETFD, F_SETFD, F_DUPFD, F_DUP2FD, F_GETFL, F_SETFL, F_GETOWN,
> and F_SETOWN according to fcntl(2). But thr_syscalls.c only
> handles F_DUPFD, F_SETFD, F_SETFL, F_GETFD, and F_GETFL, leaving
> F_DUP2FD, F_GETOWN, and F_SETOWN to be handled by the default
> case. And the default case does nothing now if WITHOUT_SYSCALL_COMPAT
> is defined. So how do F_DUP2FD, F_GETOWN, and F_SETOWN get
> Do we really need to call __sys_fcntl_compat() from libthr?
> When did the ABI change, before or after libc.so.7?
I don't know when it appeared. Would this patch eliminate the shit ?
--- thr_syscalls.c (revision 189549)
+++ thr_syscalls.c (working copy)
@@ -258,7 +258,7 @@
ret = __fcntl_compat(fd, cmd, va_arg(ap, void *));
- ret = EOPNOTSUPP;
+ ret = __sys_fcntl(fd, cmd, va_arg(ap, void *));
More information about the freebsd-threads