implicit declaration of function usleep
Posted
by
ant2009
on Stack Overflow
See other posts from Stack Overflow
or by ant2009
Published on 2012-04-07T10:45:47Z
Indexed on
2012/04/07
11:29 UTC
Read the original article
Hit count: 202
gcc (GCC) 4.6.3
c89
Hello,
I am trying to use usleep. However, I keep getting the following warning:
implicit declaration of function usleep
I have included the unistd.h header file.
The man pages mentions something about this. But I am not sure I understand by it:
usleep():
Since glibc 2.12:
_BSD_SOURCE ||
(_XOPEN_SOURCE >= 500 ||
_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) &&
!(_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700)
Before glibc 2.12:
_BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
But not sure what I a to do with the above?
Many thanks for any suggestions,
© Stack Overflow or respective owner