Subject: pkg/4610: mit-pthreads broken w.r.t. fstat and friends
To: None <>
From: Gary D. Duzan <>
List: netbsd-bugs
Date: 11/30/1997 12:50:22
>Number:         4610
>Category:       pkg
>Synopsis:       mit-pthreads broken w.r.t. fstat and friends
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 30 10:20:01 1997
>Originator:     Gary D. Duzan
>Release:        Sun Nov 30 08:27:44 EST 1997
System: NetBSD 1.3_ALPHA NetBSD 1.3_ALPHA (WHEEL) #0: Sat Nov 22 16:34:20 EST 1997 i386


   Under -current, mit-pthreads seems to be broken. In particular,
configure is failing to detect that NetBSD has the fstat, lstat,
and stat system calls. The absence of fstat appears first because
pthread libraries use machdep_sys_fstat internally, causing link
errors when using libpthread.a. The basic problem seems to be that
it expects SYS_fstat, when it really needs SYS___fstat13.

   Build and link against /usr/pkg/pthread/*


At the moment I'm attempting to work around the problem by adding
__fstat13 and friends to pthreads_syscall_list in config/configure,
then adding bits of code of the form:

int machdep_sys_fstat(int fd, struct stat *buf)

So far (which is not very far, really) it seems to be working,
though I could hope for a more elegant solution.