net: Use __kernel_clockid_t in uapi net_stamp.h
authorDavide Caratti <dcaratti@redhat.com>
Mon, 17 Dec 2018 10:26:38 +0000 (11:26 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Dec 2018 23:59:29 +0000 (15:59 -0800)
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@redhat.com>
Reported-by: Herton R. Krzesinski <herton@redhat.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Tested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/net_tstamp.h

index 97ff3c17ec4d2021a728c71141f1baa39f707eee..e5b39721c6e4877c1235b2708956474c80f4761f 100644 (file)
@@ -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 */