[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#106254: unistd.h, pthread.h declare pthread_atfork()



On Sun, Mar 30, 2003 at 11:06:12PM +0900, GOTO Masanori wrote:
> 
> Hmm, Could you provide us the sample code and gcc compile option to
> reproduce these warnings?  If you have no warnings, I would like to
> close this bug.

I've since found out that an inappropriate warning that I didn't know
about had been set in my project's Makefile, so this is not a problem
in practice.  However the situation is still there in the headers.

The code:

#include <unistd.h>
#include <pthread.h>
void f(){}


The command line:

gcc -c -Wsystem-headers -Wredundant-decls test.c


The output:

In file included from test.c:2:
/usr/include/pthread.h:673: warning: redundant redeclaration of `pthread_atfork' in same scope
/usr/include/unistd.h:1003: warning: previous declaration of `pthread_atfork'



Jeroen




Reply to: