Bug#402318: libc6-dev: /usr/include/semaphore.h can't be used without pthread.h
tag 402318 + unreproducible
Florian Le Goff a écrit :
> Package: libc6-dev
> Version: 2.3.6.ds1-9
> Severity: wishlist
> There is an issue with the /usr/include/semaphore.h file and what
> the manpages are saying for sem_open(3) and POSIX specifications
> for the semaphore.h file.
> In a nutshell, with the libc6-dev package, one can't do
> the (basic) following :
> #include <semaphore.h>
> Without having included pthread.h before. That breaks a few
> .c files that would have compiled without any error on other POSIX
> systems with the following message :
> In file included from test.c:10:
> /usr/include/semaphore.h:34: error: field '__sem_lock' has incomplete
> (where line 10 of test.c is "#include <semaphore.h>").
> Maybe should we inlcude pthread.h in /usr/include/semaphore.h ?
I don't have this problem here. /usr/include/semaphore.h includes
sys/types.h which includes bits/pthreadtypes.h, which defines
Could you please send me a testcase and the compilation options you used?
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' email@example.com | firstname.lastname@example.org
`- people.debian.org/~aurel32 | www.aurel32.net