According to Linux kernel commit v5.1-rc1~160^2~2^2~8, sparc64 is the
only architecture on Linux that has a 'timeval' definition with a 32-bit
tv_usec but a 64-bit tv_sec.
* defs.h [SPARC64] (print_sparc64_timex): New prototype.
* kernel_timex.h [SPARC64] (kernel_sparc64_timex_t): New type.
* print_timex.c [SPARC64] (print_sparc64_timex): New function.
extern int print_itimerspec64(struct tcb *, kernel_ulong_t);
extern int print_timex64(struct tcb *, kernel_ulong_t);
+# ifdef SPARC64
+extern int print_sparc64_timex(struct tcb *, kernel_ulong_t);
+# endif
+
# ifdef ALPHA
typedef struct {
int tv_sec, tv_usec;
int pad3[11];
} kernel_timex64_t;
+#ifdef SPARC64
+
+typedef struct {
+ unsigned int modes;
+ int pad0;
+ long long offset;
+ long long freq;
+ long long maxerror;
+ long long esterror;
+ int status;
+ int pad1;
+ long long constant;
+ long long precision;
+ long long tolerance;
+ struct {
+ long long tv_sec;
+ int tv_usec;
+ } time;
+ long long tick;
+ long long ppsfreq;
+ long long jitter;
+ int shift;
+ int pad2;
+ long long stabil;
+ long long jitcnt;
+ long long calcnt;
+ long long errcnt;
+ long long stbcnt;
+ int tai;
+ int pad3[11];
+} kernel_sparc64_timex_t;
+
+#endif /* SPARC64 */
+
# if HAVE_ARCH_TIME32_SYSCALLS
typedef struct {
# endif /* HAVE_ARCH_TIME32_SYSCALLS */
+# ifdef SPARC64
+
+# define PRINT_TIMEX print_sparc64_timex
+# define TIMEX_T kernel_sparc64_timex_t
+# include "print_timex.h"
+# undef TIMEX_T
+# undef PRINT_TIMEX
+
+# endif /* SPARC64 */
+
#endif /* !IN_MPERS */