]> git.ipfire.org Git - thirdparty/glibc.git/commit
mach: Use the host_get_time64 to replace the deprecated host_get_time for CLOCK_REALT...
authorZhaoming Luo <zhmingluo@163.com>
Mon, 24 Mar 2025 05:20:42 +0000 (13:20 +0800)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 25 Mar 2025 00:10:10 +0000 (01:10 +0100)
commit0544df4f4a9c6ce72de589e95f5bdadce8f103d0
treece58990a579a67e806332de10ab94068f6b8f1d0
parentb62692d3c77617747263a4cff5ea3db1ab731df0
mach: Use the host_get_time64 to replace the deprecated host_get_time for CLOCK_REALTIME when it's available

Check the availability of host_get_time64 and use it to replace
host_get_time for CLOCK_REALTIME when it's available. Fall back to
host_get_time if gnumach does not support host_get_time64 but the
gnumach headers do.

host_get_time is deprecated
See https://git.savannah.gnu.org/cgit/hurd/gnumach.git/commit/?id=569df850cd7badd1e36132ad3b44aa76a4d27c25
However, it's kept for backward compactbility.

* config.h.in: Add HAVE_HOST_GET_TIME64 config entry.
* sysdeps/mach/clock_gettime.c: Use host_get_time64 for CLOCK_REALTIME
  when it's possible, fall to host_get_time otherwise.
* sysdeps/mach/configure: Check the existence of host_get_time64 RPC.
* sysdeps/mach/configure.ac: Check the existence of host_get_time64 RPC.
Message-ID: <20250324052042.19803-1-zhmingluo@163.com>
config.h.in
sysdeps/mach/clock_gettime.c
sysdeps/mach/configure
sysdeps/mach/configure.ac