Hi Georg, > Date: 2026-10-27 01:37:11+0100 > From: Georg Sauthoff > > GNU libc declares clock_adjtime() when including time.h, and not when > just sys/timex.h is included, iff support for GNU features is requested. > > Verification: > > $ for i in BLAH _GNU_SOURCE; do for j in sys/timex.h time.h; do echo -n "Testing $i and $j ... "; echo -e '#define '"$i"'\n#include <'"$j"'>\nvoid f(){clock_adjtime;}' | gcc -xc - -o /dev/null -c 2>/dev/null && echo OK || echo FAIL; done; done > Testing BLAH and sys/timex.h ... FAIL > Testing BLAH and time.h ... FAIL > Testing _GNU_SOURCE and sys/timex.h ... FAIL > Testing _GNU_SOURCE and time.h ... OK > > (Test output is from a Fedora 43 system) > > Signed-off-by: Georg Sauthoff Thanks! I've applied the patch. Have a lovely day! Alex > --- > man/man2/adjtimex.2 | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/man/man2/adjtimex.2 b/man/man2/adjtimex.2 > index f12d9413e..5b9a0667b 100644 > --- a/man/man2/adjtimex.2 > +++ b/man/man2/adjtimex.2 > @@ -17,9 +17,12 @@ .SH SYNOPSIS > .P > .BI "int adjtimex(struct timex *" "buf" ); > .P > -.BI "int clock_adjtime(clockid_t " clk_id, " struct timex *" "buf" ); > -.P > .BI "int ntp_adjtime(struct timex *" buf ); > +.P > +.BR #define\~_GNU_SOURCE " // See feature_test_macros(7)" > +.B #include > +.P > +.BI "int clock_adjtime(clockid_t " clk_id, " struct timex *" "buf" ); > .fi > .SH DESCRIPTION > Linux uses David L.\& Mills' clock adjustment algorithm (see RFC\ 5905). > -- > 2.55.0 > > --