When compiling gzip 1.14 on NetBSD 11.99.6/x86_64 (with its default
gcc 14.3) I see the following compilation error:

  CC       libgzip_a-utimens.o
utimens.c: In function 'rpl_utimens':
utimens.c:541:10: error: implicit declaration of function 'utimens'; did you 
mean 'futimens'? [-Wimplicit-function-declaration]
  541 |   return utimens (file, timespec);
      |          ^~~~~~~
      |          futimens
utimens.c: In function 'rpl_lutimens':
utimens.c:563:10: error: implicit declaration of function 'lutimens'; did you 
mean 'futimens'? [-Wimplicit-function-declaration]
  563 |   return lutimens (file, timespec);
      |          ^~~~~~~~
      |          futimens

According to the NetBSD man page, utimens and lutimens exist and are
provided by sys/time.h and sys/stat.h, but both of these headers are
already included, so I'm not sure what the problem is, perhaps a
namespace restriction.

-Wno-implicit-declarations works around this and the resulting binary
seems to work.
 Thomas



Reply via email to