C - Implicit declaration of function "pthread_timedjoin_np"

I am moving the windows library to linux. I need to use a synchronized connection to wait for a thread to join a specific timeout.

When I compile a library on Linux, I get a warning

Implicit function declaration - pthread_timedjoin_np

I included pthread.h and compiled the -lpthread link. I know that pthread_timedjoin_np is a non-standard GNU function. The function first appeared in glibc in version 2.3.3. and somewhere in BCD v6.

I even checked the Man Page for Linux, but did not get any help. How to avoid this warning? Any help?

Edit-1: My system is RedHat 5.

+3
source share
1

, #define _GNU_SOURCE . <features.h>, GNU C. , _GNU_SOURCE, <features.h> _GNU_SOURCE.

, , -D_GNU_SOURCE .

+6

All Articles