Skip to content

Conversation

@ferdna
Copy link

@ferdna ferdna commented Jan 8, 2018

fpgaconfig.c: In function ‘ConfigBegin’:
fpgaconfig.c:222:3: warning: implicit declaration of function ‘usleep’; did you mean ‘sleep’? [-Wimplicit-function-declaration]
usleep(10000);
^~~~~~
sleep

fpgaconfig.c: In function ‘ConfigBegin’:
fpgaconfig.c:222:3: warning: implicit declaration of function ‘usleep’; did you mean ‘sleep’? [-Wimplicit-function-declaration]
   usleep(10000);
   ^~~~~~
   sleep
@ferdna
Copy link
Author

ferdna commented Jan 8, 2018

usleep(10000); = sleep(10)
usleep(10000); = nanosleep(10000000)

usleep is obsolote and posix only. nanosleep is in the glibc
http://man7.org/linux/man-pages/man2/nanosleep.2.html

@laf0rge
Copy link
Contributor

laf0rge commented Mar 11, 2021

there's nothing wrong with POSIX. In fact, it's more porrtable than glibc-specifics ;)

I think all that may be missing is a
#include <unistd.h>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants