[PATCH 4.19 057/170] net: Use __kernel_clockid_t in uapi net_stamp.h

From: Greg Kroah-Hartman
Date: Mon Jan 07 2019 - 07:48:54 EST


4.19-stable review patch. If anyone has any objections, please let me know.

------------------

From: Davide Caratti <dcaratti@xxxxxxxxxx>

[ Upstream commit e2c4cf7f98a519eb4d95532bfa06bcaf3562fed5 ]

Herton reports the following error when building a userspace program that
includes net_stamp.h:

In file included from foo.c:2:
/usr/include/linux/net_tstamp.h:158:2: error: unknown type name
âclockid_tâ
clockid_t clockid; /* reference clockid */
^~~~~~~~~

Fix it by using __kernel_clockid_t in place of clockid_t.

Fixes: 80b14dee2bea ("net: Add a new socket option for a future transmit time.")
Cc: Timothy Redaelli <tredaelli@xxxxxxxxxx>
Reported-by: Herton R. Krzesinski <herton@xxxxxxxxxx>
Signed-off-by: Davide Caratti <dcaratti@xxxxxxxxxx>
Tested-by: Paolo Abeni <pabeni@xxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
include/uapi/linux/net_tstamp.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/include/uapi/linux/net_tstamp.h
+++ b/include/uapi/linux/net_tstamp.h
@@ -155,8 +155,8 @@ enum txtime_flags {
};

struct sock_txtime {
- clockid_t clockid; /* reference clockid */
- __u32 flags; /* as defined by enum txtime_flags */
+ __kernel_clockid_t clockid;/* reference clockid */
+ __u32 flags; /* as defined by enum txtime_flags */
};

#endif /* _NET_TIMESTAMPING_H */