Menu

#72 Duplicate function declaration in pthread.h

Unstable (example)
open
nobody
None
5
2014-11-09
2014-11-09
No

Hi,

The function pthread_delay_np is declared twice in pthread.h.

This causes compilation error for C files when _TIMESPEC_DEFINED is defined.

#define _TIMESPEC_DEFINED
#include <pthread.h>

Results in:

In file included from main.c:2:0:
C:/mingw64/x86_64-w64-mingw32/include/pthread.h:410:43: error: conflicting types for 'pthread_delay_np'
 int                        WINPTHREAD_API pthread_delay_np (const struct timespec *interval);
                                           ^
In file included from main.c:2:0:
C:/mingw64/x86_64-w64-mingw32/include/pthread.h:161:23: note: previous declaration of 'pthread_delay_np' was here
 int    WINPTHREAD_API pthread_delay_np (const struct timespec *interval);
                       ^
1 Attachments

Discussion