If you tried to compile a program using the header file semaphore.h under GNU/Linux Debian (who uses LinuxThreads in order to provide the semaphore part of POSIX IPC tools); remember to include pthread.h before.
Otherwise... you're going to get a nice error :
/usr/include/semaphore.h:34: error: field '__sem_lock' has incomplete
type
... since the semaphore.h is using a few types defined by pthread.h (or another header included by pthread.h). I opened a thread on the libc6-dev debian package, as a whishlist item.