History

socket: Add struct __kernel_sock_timeval

The new type is meant to be used as a y2038 safe structure to be used as part of cmsg data. Presently the SO_TIMESTAMP socket option uses struct timeval for timestamps. This is not y2038 safe. Subsequent patches in the series add new y2038 safe socket option to be used in the place of SO_TIMESTAMP_OLD. struct __kernel_sock_timeval will be used as the timestamp format at that time. struct __kernel_sock_timeval also maintains the same layout across 32 bit and 64 bit ABIs.

Deepa Dinamani committed 7 years ago

Commit 98bb03c1 parent 13c6ee21 file · +5 −0Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/time.h+5−0
@@ -70,6 +70,11 @@ struct __kernel_old_timeval { · 69 unmodified lines
7070 };
7171 #endif
7272
73+struct __kernel_sock_timeval {
74+ __s64 tv_sec;
75+ __s64 tv_usec;
76+};
77+
7378 /*
7479 * The IDs of the various system clocks (for POSIX.1b interval timers):
7580 */