From 42160188073fe9e8abaad98e352260d27b5a0b51 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 31 Mar 2025 22:49:37 +0900 Subject: [PATCH] missing_socket: drop unnecessary definitions and update comments - SO_PEERGROUPS is since kernel v4.13 (28b5ba2aa0f55d80adb2624564ed2b170c19519e), - SO_BINDTOIFINDEX is since kernel v5.1 (f5dd3d0c9638a9d9a02b5964c4ad636f06cf7e2c). --- src/basic/missing_socket.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/basic/missing_socket.h b/src/basic/missing_socket.h index 3dbe735f64a..874e93f37ed 100644 --- a/src/basic/missing_socket.h +++ b/src/basic/missing_socket.h @@ -3,33 +3,29 @@ #include -#ifndef SO_PEERGROUPS -#define SO_PEERGROUPS 59 -#endif - +/* Supported since kernel v6.5 (5e2ff6704a275be009be8979af17c52361b79b89) */ #ifndef SO_PASSPIDFD #define SO_PASSPIDFD 76 #endif +/* Supported since kernel v6.5 (7b26952a91cf65ff1cc867a2382a8964d8c0ee7d) */ #ifndef SO_PEERPIDFD #define SO_PEERPIDFD 77 #endif -#ifndef SO_BINDTOIFINDEX -#define SO_BINDTOIFINDEX 62 -#endif - /* Not exposed yet. Defined in include/linux/socket.h. */ #ifndef SOL_SCTP #define SOL_SCTP 132 #endif -/* since glibc-2.39 */ +/* Supported since kernel v2.6.17 (2c7946a7bf45ae86736ab3b43d0085e43947945c). + * Defined since glibc-2.39 */ #ifndef SCM_SECURITY #define SCM_SECURITY 0x03 #endif -/* since glibc-2.39 */ +/* Supported since kernel v6.5 (5e2ff6704a275be009be8979af17c52361b79b89). + * Defined since glibc-2.39 */ #ifndef SCM_PIDFD #define SCM_PIDFD 0x04 #endif -- 2.47.3