]> sourceware.org Git - glibc.git/commitdiff
hurd: Fix __TIMESIZE on x86_64
authorSergey Bugaev <bugaevc@gmail.com>
Fri, 19 May 2023 17:15:16 +0000 (20:15 +0300)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 19 May 2023 18:25:37 +0000 (20:25 +0200)
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>

sysdeps/mach/clock_gettime.c
sysdeps/mach/hurd/bits/timesize.h

index be775ed2bb41145f9ff42d0839129cf87a071a1a..9124a32ef78fb6674174740c56c37b757d440b8f 100644 (file)
@@ -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
index 900a0a237da4498af990ba34f5ca27a3a8ad83e8..981452c0263917cf2d3d8fa8ecf6c4293d6a0559 100644 (file)
@@ -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
This page took 0.047803 seconds and 5 git commands to generate.