This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH] AARCH64/ILP32: introduce kernel time types


Yury Norov <ynorov@caviumnetworks.com> writes:

> diff --git a/sysdeps/gnu/bits/utmp.h b/sysdeps/gnu/bits/utmp.h
> index 2a1ffcb..fae9126 100644
> --- a/sysdeps/gnu/bits/utmp.h
> +++ b/sysdeps/gnu/bits/utmp.h
> @@ -38,7 +38,7 @@ struct lastlog
>  #ifdef __WORDSIZE_TIME64_COMPAT32
>      int32_t ll_time;
>  #else
> -    __time_t ll_time;
> +    __ktime_t ll_time;
>  #endif
>      char ll_line[UT_LINESIZE];
>      char ll_host[UT_HOSTSIZE];
> @@ -76,8 +76,8 @@ struct utmp
>      int32_t tv_usec;		/* Microseconds.  */
>    } ut_tv;			/* Time entry was made.  */
>  #else
> -  long int ut_session;		/* Session ID, used for windowing.  */
> -  struct timeval ut_tv;		/* Time entry was made.  */
> +  __ktime_t ut_session;		/* Session ID, used for windowing.  */
> +  struct __kernel_timeval ut_tv;/* Time entry was made.  */
>  #endif

I don't think we should be using kernel-related types here.  This is a
user-space-only, on-disk struct, so it'd better use fixed size types.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]