-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Install error: implicit declaration of function 'clock_gettime' is invalid in C99 #133
Comments
The issue comes from macOS 10.10 which lacks the actual function, you need at least macOS 10.12. MacOS 10.10 is very old (it hasn't received security updates for a couple years now), is there a reason to use it? |
I added a quick workaround: #135 |
The fix is released in libjuice v0.9.3, to check it works with node-datachannel you'll need to change |
Yes I was using 10.10 because it runs on an older machine that starts to slow down whenever I update it. I appreciate you taking the time to create the workaround and will give it a try and let you know.If I still have issues I will probably have to find something that will install linux as I imagine it would give less headaches. Thank you again. |
I don't really know any C but am trying to install node-datachannel, and it uses libdatachannel and this, libjuice, as a dependency. This is on an older macOS, 10.10 I'm using as a test server.
I'm using npm run build and the error stops the build and the exact error is:
[ 2%] Building C object _deps/libdatachannel-build/deps/libjuice/CMakeFiles/juice-static.dir/src/random.c.o
/Users/testserver/Desktop/node-datachannel/build/_deps/libdatachannel-src/deps/libjuice/src/random.c:75:6: warning: implicit declaration of function 'clock_gettime' is invalid in C99
[-Wimplicit-function-declaration]
if (clock_gettime(CLOCK_REALTIME, &ts) == 0)
^
/Users/testserver/Desktop/node-datachannel/build/_deps/libdatachannel-src/deps/libjuice/src/random.c:75:20: error: use of undeclared identifier 'CLOCK_REALTIME'
if (clock_gettime(CLOCK_REALTIME, &ts) == 0)
^
1 warning and 1 error generated.
make[2]: *** [_deps/libdatachannel-build/deps/libjuice/CMakeFiles/juice-static.dir/src/random.c.o] Error 1
make[1]: *** [_deps/libdatachannel-build/deps/libjuice/CMakeFiles/juice-static.dir/all] Error 2
make: *** [all] Error 2
ERR! OMG Process terminated: 2
Am I doing something wrong? Any help or a workaround would be a life saver right now as I have no idea what to do.
The text was updated successfully, but these errors were encountered: