[PATCH glibc] (hurd) adjtime: on error return -1 and set errno
[email protected] Tue, 26 May 2026 22:41:03 -0300
Newsgroups
gmane.os.hurd.bugs
Message-ID
<[email protected] >
From: Diego Nieto Cid <[email protected] >
* sysdeps/mach/hurd/adjtime.c: use __hurd_fail to return
errors back to the caller.
---
sysdeps/mach/hurd/adjtime.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/mach/hurd/adjtime.c b/sysdeps/mach/hurd/adjtime.c
index 4408b1cff5..762fdeb4a3 100644
--- a/sysdeps/mach/hurd/adjtime.c
+++ b/sysdeps/mach/hurd/adjtime.c
@@ -39,7 +39,7 @@ __adjtime (const struct timeval *delta, struct timeval *olddelta)
{
if (delta->tv_usec >= TIME_MICROS_MAX ||
delta->tv_usec <= -TIME_MICROS_MAX)
- return EINVAL;
+ return __hurd_fail (EINVAL);
rpc_delta.seconds = delta->tv_sec;
rpc_delta.microseconds = delta->tv_usec;
@@ -55,7 +55,7 @@ __adjtime (const struct timeval *delta, struct timeval *olddelta)
rpc_delta.microseconds = MACH_ADJTIME_USECS_OMIT;
}
#else
- return EINVAL;
+ return __hurd_fail (EINVAL);
#endif
err = __host_adjust_time (hostpriv, rpc_delta, &rpc_olddelta);
--
2.53.0