Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning message when compiling. #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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