socket: Use old_timeval types for socket timestamps

As part of y2038 solution, all internal uses of
struct timeval are replaced by struct __kernel_old_timeval
and struct compat_timeval by struct old_timeval32.
Make socket timestamps use these new types.

This is mainly to be able to verify that the kernel build
is y2038 safe when such non y2038 safe types are not
supported anymore.

Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Cc: isdn@linux-pingi.de
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Deepa Dinamani
2019-02-02 07:34:48 -08:00
committed by David S. Miller
parent bcb3fc3247
commit 13c6ee2a92
7 changed files with 12 additions and 12 deletions

View File

@@ -3486,16 +3486,16 @@ static inline ktime_t skb_get_ktime(const struct sk_buff *skb)
/**
* skb_get_timestamp - get timestamp from a skb
* @skb: skb to get stamp from
* @stamp: pointer to struct timeval to store stamp in
* @stamp: pointer to struct __kernel_old_timeval to store stamp in
*
* Timestamps are stored in the skb as offsets to a base timestamp.
* This function converts the offset back to a struct timeval and stores
* it in stamp.
*/
static inline void skb_get_timestamp(const struct sk_buff *skb,
struct timeval *stamp)
struct __kernel_old_timeval *stamp)
{
*stamp = ktime_to_timeval(skb->tstamp);
*stamp = ns_to_kernel_old_timeval(skb->tstamp);
}
static inline void skb_get_timestampns(const struct sk_buff *skb,