mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
y2038: socket: use __kernel_old_timespec instead of timespec
The 'timespec' type definition and helpers like ktime_to_timespec() or timespec64_to_timespec() should no longer be used in the kernel so we can remove them and avoid introducing y2038 issues in new code. Change the socket code that needs to pass a timespec to user space for backward compatibility to use __kernel_old_timespec instead. This type has the same layout but with a clearer defined name. Slightly reformat tcp_recv_timestamp() for consistency after the removal of timespec64_to_timespec(). Acked-by: Deepa Dinamani <deepa.kernel@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
0309f98f2f
commit
df1b4ba9d4
4 changed files with 23 additions and 16 deletions
|
@ -793,7 +793,7 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
|
|||
put_cmsg(msg, SOL_SOCKET, SO_TIMESTAMPNS_NEW,
|
||||
sizeof(ts), &ts);
|
||||
} else {
|
||||
struct timespec ts;
|
||||
struct __kernel_old_timespec ts;
|
||||
|
||||
skb_get_timestampns(skb, &ts);
|
||||
put_cmsg(msg, SOL_SOCKET, SO_TIMESTAMPNS_OLD,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue