mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
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>
This commit is contained in:
parent
75d319c06e
commit
0309f98f2f
2 changed files with 11 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue