On Sun, 09 Jul 2006, 19:31:57 +0200, peter burden wrote:
[...] Yes, using NPTL and pthread.h is included. Here's the uname -a output
Linux linux 2.6.13-15-default #1 Tue Sep 13 14:56:15 UTC 2005 i686 athlon i386 GNU/Linux
Here's the warnings :-
gcc -O -c -g -I/home/peter/spider/include -DDEBUG=7 -pthread -DLINUX -funsigned-char -Wall -Wextra -fstack-protector-all -c -o cachegen.o /home/peter/spider/source/cachegen.c /home/peter/spider/source/cachegen.c: In function ‘getfromcache’: /home/peter/spider/source/cachegen.c:157: warning: implicit declaration of function ‘pthread_rwlock_rdlock’ /home/peter/spider/source/cachegen.c:171: warning: implicit declaration of function ‘pthread_rwlock_unlock’ /home/peter/spider/source/cachegen.c:175: warning: implicit declaration of function ‘pthread_rwlock_wrlock’
The prototype declaration is depending on some #define flag which you haven't defined. You should add "-D_XOPEN_SOURCE" to the gcc flags you're using to make the prototype declaration visible. HTH, cheers. l8er manfred