[glibc] hurd: adjtime: on error return -1 and set errno

Samuel Thibault via Glibc-cvs <[email protected]> Wed, 27 May 2026 12:19:04 +0000 (GMT)
Newsgroups gmane.comp.lib.glibc.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c289868492ab811ef4d0a3d3efc4772967f4b8b1

commit c289868492ab811ef4d0a3d3efc4772967f4b8b1
Author: Diego Nieto Cid <[email protected]>
Date:   Tue May 26 22:41:03 2026 -0300

    hurd: adjtime: on error return -1 and set errno
    
      * sysdeps/mach/hurd/adjtime.c: use __hurd_fail to return
        errors back to the caller.
    Message-ID: <[email protected]>

Diff:
---
 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);