-
Notifications
You must be signed in to change notification settings - Fork 643
Closed
Description
Describe the bug
Building KeyDB 6.2.1 results in the following error on macOS:
clang -o luac luac.o print.o liblua.a -lm
CC ae.o
CC adlist.o
CC quicklist.o
CC anet.o
CC server.o
CC dict.o
CC sds.o
CC zmalloc.o
CC lzf_c.o
CC lzf_d.o
CC pqsort.o
CC zipmap.o
CC sha1.o
CC ziplist.o
CC release.o
CC networking.o
CC util.o
CC object.o
CC db.o
CC replication.o
CC rdb.o
server.cpp:6565:9: error: use of undeclared identifier 'clock_nanosleep'
clock_nanosleep(CLOCK_MONOTONIC, 0, &delay, NULL);
^
1 error generated.
make[1]: *** [server.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install] Error 2
To reproduce
Download and unpack the source for KeyDB 6.2.1, then make install PREFIX=<an arbitrary dir>.
Expected behavior
The build should succeed and KeyDB 6.2.1 should be installed to the specified prefix.
Additional information
This issue seems to stem from b03eab2, when a usage of clock_nanosleep() was introduced in src/server.cpp, which is not available on macOS. It looks like macOS does have a nanosleep() function and a mach_wait_until() function available but it's unclear to me if either are a drop-in replacement.
Metadata
Metadata
Assignees
Labels
No labels