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.
Showing the changes to include/uapi/linux/errqueue.h (1 of 2 files). Show all
Unified · Split
| @@ -37,9 +37,16 @@ struct sock_extended_err { · 36 unmodified lines | ||
| 37 | 37 | * The timestamping interfaces SO_TIMESTAMPING, MSG_TSTAMP_* |
| 38 | 38 | * communicate network timestamps by passing this struct in a cmsg with |
| 39 | 39 | * recvmsg(). See Documentation/networking/timestamping.txt for details. |
| 40 | + * User space sees a timespec definition that matches either | |
| 41 | + * __kernel_timespec or __kernel_old_timespec, in the kernel we | |
| 42 | + * require two structure definitions to provide both. | |
| 40 | 43 | */ |
| 41 | 44 | struct scm_timestamping { |
| 45 | +#ifdef __KERNEL__ | |
| 46 | + struct __kernel_old_timespec ts[3]; | |
| 47 | +#else | |
| 42 | 48 | struct timespec ts[3]; |
| 49 | +#endif | |
| 43 | 50 | }; |
| 44 | 51 | |
| 45 | 52 | struct scm_timestamping64 { |