History

y2038: socket: remove timespec reference in timestamping

In order to remove the 'struct timespec' definition and the timespec64_to_timespec() helper function, change over the in-kernel definition of 'struct scm_timestamping' to use the __kernel_old_timespec replacement and open-code the assignment.

Arnd Bergmann committed 7 years ago

Commit 0309f981 parent 75d319c2 files · +11 −2Browse files

Showing the changes to include/uapi/linux/errqueue.h (1 of 2 files). Show all

Unified · Split

include/uapi/linux/errqueue.h+7−0
@@ -37,9 +37,16 @@ struct sock_extended_err { · 36 unmodified lines
3737 * The timestamping interfaces SO_TIMESTAMPING, MSG_TSTAMP_*
3838 * communicate network timestamps by passing this struct in a cmsg with
3939 * recvmsg(). See Documentation/networking/timestamping.txt for details.
40+ * User space sees a timespec definition that matches either
41+ * __kernel_timespec or __kernel_old_timespec, in the kernel we
42+ * require two structure definitions to provide both.
4043 */
4144 struct scm_timestamping {
45+#ifdef __KERNEL__
46+ struct __kernel_old_timespec ts[3];
47+#else
4248 struct timespec ts[3];
49+#endif
4350 };
4451
4552 struct scm_timestamping64 {