-
Notifications
You must be signed in to change notification settings - Fork 11
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
Does not compile on OS X #16
Comments
Apparently, the issue is: Here is a quick and dirty patch #ifdef MACH #ifdef MACH // OS X does not have clock_gettime, use clock_get_time #ifdef MACH // OS X does not have clock_gettime, use clock_get_time |
Hi @hurshjain, thanks for your feedback. Can you please check it out 284e5aa and see if it fixes the issue? |
Hi - thanks for the update. That does not fix the issue since the problem is that OS X does not have a clock_gettime function at all (regardless of C standard level). You have to use the #ifdef MACH and I was able to compile and run successfully adding the above includes/IFDEF's on my OS X box.. |
Ok, I had a few warnings on macOS which was indeed fixed by 284e5aa. I have no OS X at hands, feel free to send a PR otherwise I will check it out when possible. |
While compiling on OS X (Darwin Kernel Version 15.6.0, RELEASE_X86_64 x86_64), I get the following error:
snore.c:110:16: error: use of undeclared identifier 'CLOCK_REALTIME'
clock_gettime(CLOCK_REALTIME, &start);
The text was updated successfully, but these errors were encountered: