From c71dbb24c947dc14f43960bfec4da670fccba580 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 1 Nov 2019 20:11:08 -0400 Subject: move time64 socket options from arch bits to top-level sys/socket.h now that all 32-bit archs have 64-bit time types, the values for the time-related socket option macros can be treated as universal for 32-bit archs. the sys/socket.h mechanism for this predates arch/generic and is instead in the top-level header. x32, which does not use the new time64 values of the macros, already has its own overrides, so this commit does not affect it. --- include/sys/socket.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/sys/socket.h b/include/sys/socket.h index 4ea7be1e..a1c0b01c 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -225,15 +225,26 @@ struct linger { #endif #ifndef SO_RCVTIMEO +#if __LONG_MAX == 0x7fffffff +#define SO_RCVTIMEO 66 +#define SO_SNDTIMEO 67 +#else #define SO_RCVTIMEO 20 #define SO_SNDTIMEO 21 #endif +#endif #ifndef SO_TIMESTAMP +#if __LONG_MAX == 0x7fffffff +#define SO_TIMESTAMP 63 +#define SO_TIMESTAMPNS 64 +#define SO_TIMESTAMPING 65 +#else #define SO_TIMESTAMP 29 #define SO_TIMESTAMPNS 35 #define SO_TIMESTAMPING 37 #endif +#endif #define SO_SECURITY_AUTHENTICATION 22 #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 -- cgit v1.2.1