public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Samuel Thibault <sthibaul@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] hurd: Fix __TIMESIZE on x86_64
Date: Fri, 19 May 2023 18:25:41 +0000 (GMT)	[thread overview]
Message-ID: <20230519182541.CB9653858C41@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4d3f846b88d307d459a283617778fc11e9bd25ac

commit 4d3f846b88d307d459a283617778fc11e9bd25ac
Author: Sergey Bugaev <bugaevc@gmail.com>
Date:   Fri May 19 20:15:16 2023 +0300

    hurd: Fix __TIMESIZE on x86_64
    
    We had sizeof (time_t) == 8, but __TIMESIZE == 32.
    
    Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
    Message-Id: <20230519171516.3698754-1-bugaevc@gmail.com>

Diff:
---
 sysdeps/mach/clock_gettime.c      | 2 ++
 sysdeps/mach/hurd/bits/timesize.h | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c
index be775ed2bb..9124a32ef7 100644
--- a/sysdeps/mach/clock_gettime.c
+++ b/sysdeps/mach/clock_gettime.c
@@ -111,6 +111,7 @@ strong_alias (__clock_gettime, __clock_gettime_2);
 compat_symbol (libc, __clock_gettime_2, clock_gettime, GLIBC_2_2);
 #endif
 
+#if __TIMESIZE != 64
 int
 __clock_gettime64 (clockid_t clock_id, struct __timespec64 *ts64)
 {
@@ -124,3 +125,4 @@ __clock_gettime64 (clockid_t clock_id, struct __timespec64 *ts64)
   return ret;
 }
 libc_hidden_def (__clock_gettime64)
+#endif
diff --git a/sysdeps/mach/hurd/bits/timesize.h b/sysdeps/mach/hurd/bits/timesize.h
index 900a0a237d..981452c026 100644
--- a/sysdeps/mach/hurd/bits/timesize.h
+++ b/sysdeps/mach/hurd/bits/timesize.h
@@ -16,5 +16,7 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
+#include <bits/wordsize.h>
+
 /* Size in bits of the 'time_t' type of the default ABI.  */
-#define __TIMESIZE	32
+#define __TIMESIZE	__WORDSIZE

                 reply	other threads:[~2023-05-19 18:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230519182541.CB9653858C41@sourceware.org \
    --to=sthibaul@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).