diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-10-27 18:09:32 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2019-11-15 14:38:29 +0100 |
commit | 0309f98f2fdc3526317e9bac150ca690f1f94ce6 (patch) | |
tree | 47f59d2627735113e7ce37b9983670a4af7eed97 /net/core/scm.c | |
parent | 75d319c06e6a76f67549c0ae1007dc3167804f4e (diff) | |
download | linux-stable-0309f98f2fdc3526317e9bac150ca690f1f94ce6.tar.gz linux-stable-0309f98f2fdc3526317e9bac150ca690f1f94ce6.tar.bz2 linux-stable-0309f98f2fdc3526317e9bac150ca690f1f94ce6.zip |
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.
Acked-by: Deepa Dinamani <deepa.kernel@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'net/core/scm.c')
-rw-r--r-- | net/core/scm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/core/scm.c b/net/core/scm.c index 31a38239c92f..dc6fed1f221c 100644 --- a/net/core/scm.c +++ b/net/core/scm.c @@ -268,8 +268,10 @@ void put_cmsg_scm_timestamping(struct msghdr *msg, struct scm_timestamping_inter struct scm_timestamping tss; int i; - for (i = 0; i < ARRAY_SIZE(tss.ts); i++) - tss.ts[i] = timespec64_to_timespec(tss_internal->ts[i]); + for (i = 0; i < ARRAY_SIZE(tss.ts); i++) { + tss.ts[i].tv_sec = tss_internal->ts[i].tv_sec; + tss.ts[i].tv_nsec = tss_internal->ts[i].tv_nsec; + } put_cmsg(msg, SOL_SOCKET, SO_TIMESTAMPING_OLD, sizeof(tss), &tss); } |