Skip to content

Commit

Permalink
configure: add <sys/timex.h> for clock_adjtime on musl (#2085)
Browse files Browse the repository at this point in the history
for glibc, if _GNU_SOURCE is defined, <time.h> will include <sys/timex.h>
but not for musl, so add "#include <sys/timex.h>"

although `man clock_adjtime` said "#include <sys/timex.h>", but it won't
work for glibc w/o "#include <time.h>", I don't known why yet.

PS it seems clock_adjtime is used nowhere?

Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
  • Loading branch information
clan authored Jan 14, 2025
1 parent 9682fc4 commit a78d690
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions qemu/configure
Original file line number Diff line number Diff line change
Expand Up @@ -1455,6 +1455,7 @@ fi
clock_adjtime=no
cat > $TMPC <<EOF
#include <time.h>
#include <sys/timex.h>
int main(void)
{
Expand Down

0 comments on commit a78d690

Please sign in to comment.