I've written some pthread code that use timed waits on a condition variable but in order to ensure a relative wait I've set the condvar's clock type to CLOCK_MONOTONIC using pthread_condattr_setclock().
In order to compile and link pthread_condattr_setclock() on RHEL4, i've had to add -I/usr/include/nptl and -L/usr/lib/nptl to my gcc command line. My understanding is that the 2.6 kernel (which RHEL4 has) uses the NPTL pthread implementation by default so why do I need to specify these paths explicitly to use this function?
It's only this function that requires me to do this: if I leave it out, everything compiles and links fine without the extra paths specified (although the behaviour of the code is then incorrect).