>From 7933bc33e22a0a34c72af77aed806c5619aba332 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Thu, 9 May 2019 19:20:17 +0000 Subject: [PATCH 06/11] sys/socket.h: add new SO_ definitions from linux v5.1 the new definitions are from linux commits a9beb86ae6e55bd92f38453c8623de60b8e5a308 sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW 45bdc66159d49bfc7f75fe02d25bc74f5d2660cf socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes 9718475e69084de15c3930ce35672a7dc6da866b socket: Add SO_TIMESTAMPING_NEW 887feae36aee6c08e0dafcdaa5ba921abbb2c56b socket: Add SO_TIMESTAMP[NS]_NEW 7f1bc6e95d7840d4305595b3e4025cddda88cee5 sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD f5dd3d0c9638a9d9a02b5964c4ad636f06cf7e2c net: introduce SO_BINDTOIFINDEX sockopt SO_BINDTOIFINDEX behaves similar to SO_BINDTODEVICE, but takes a network interface index as argument, rather than the network interface name. _NEW socket options got introduced for 64bit time_t support on 32bit targets, in musl the affected socket options are always the same as the _OLD values since different time_t requires a new abi, so the _OLD vs _NEW dispatch logic was not copied from the uapi headers. --- include/sys/socket.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/sys/socket.h b/include/sys/socket.h index cd38a4c8..e6d43d08 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -237,6 +237,17 @@ struct linger { #define SO_ZEROCOPY 60 #define SO_TXTIME 61 #define SCM_TXTIME SO_TXTIME +#define SO_BINDTOIFINDEX 62 +#define SO_TIMESTAMP_NEW 63 +#define SO_TIMESTAMPNS_NEW 64 +#define SO_TIMESTAMPING_NEW 65 +#define SO_RCVTIMEO_NEW 66 +#define SO_SNDTIMEO_NEW 67 +#define SO_TIMESTAMP_OLD SO_TIMESTAMP +#define SO_TIMESTAMPNS_OLD SO_TIMESTAMPNS +#define SO_TIMESTAMPING_OLD SO_TIMESTAMPING +#define SO_RCVTIMEO_OLD SO_RCVTIMEO +#define SO_SNDTIMEO_OLD SO_SNDTIMEO #ifndef SOL_SOCKET #define SOL_SOCKET 1 -- 2.21.0