We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
$ uname -a FreeBSD t420nnd.cls.to 10.3-RELEASE-p24 FreeBSD 10.3-RELEASE-p24 #0: Wed Nov 15 04:57:40 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 $ gmake -C test gmake : on entre dans le répertoire « /home/nanard/code/git/base64/test » rm -f benchmark test_base64 *.o cc -std=c99 -O3 -Wall -Wextra -pedantic -o codec_supported.o -c codec_supported.c cc -std=c99 -O3 -Wall -Wextra -pedantic -o test_base64 test_base64.c codec_supported.o ../lib/libbase64.o cc -std=c99 -O3 -Wall -Wextra -pedantic -o benchmark benchmark.c codec_supported.o ../lib/libbase64.o -lrt benchmark.c:101:16: error: use of undeclared identifier 'CLOCK_REALTIME' clock_gettime(CLOCK_REALTIME, o_time); ^ benchmark.c:99:35: warning: unused parameter 'o_time' [-Wunused-parameter] base64_gettime (base64_timespec * o_time) ^ 1 warning and 1 error generated. gmake: *** [Makefile:24: benchmark] Error 1
Adding -D_XOPEN_SOURCE=600 does the trick
diff --git a/test/Makefile b/test/Makefile index d104582..11c57a3 100644 --- a/test/Makefile +++ b/test/Makefile @@ -2,6 +2,7 @@ CFLAGS += -std=c99 -O3 -Wall -Wextra -pedantic ifdef OPENMP CFLAGS += -fopenmp endif +CFLAGS += -D_XOPEN_SOURCE=600 TARGET := $(shell $(CC) -dumpmachine) ifneq (, $(findstring darwin, $(TARGET)))
The text was updated successfully, but these errors were encountered:
#47: benchmark: unlock CLOCK_REALTIME on FreeBSD
42def00
On FreeBSD, an extra macro must be defined to make CLOCK_REALTIME available.
Merged, finally. Sorry for the delay, I had moved on to other projects for a while. Thanks for the report!
Sorry, something went wrong.
No branches or pull requests
Adding -D_XOPEN_SOURCE=600 does the trick
The text was updated successfully, but these errors were encountered: