sd-netlink,sd-device: drop old kernels (<4.2) support

NETLINK_LIST_MEMBERSHIPS is supported since kernel v4.2, specifically
https://github.com/torvalds/linux/commit/b42be38b2778eda2237fc759e55e3b698b05b315

Our baseline on the kernel is v5.4. Let's drop unnecessary conditions.
This commit is contained in:
Yu Watanabe
2025-04-15 03:40:40 +09:00
parent d3d375a686
commit 6dbf2c1beb
4 changed files with 3 additions and 21 deletions
-2
View File
@@ -1819,8 +1819,6 @@ int netlink_socket_get_multicast_groups(int fd, size_t *ret_len, uint32_t **ret_
assert(fd >= 0);
/* This returns ENOPROTOOPT if the kernel is older than 4.2. */
if (getsockopt(fd, SOL_NETLINK, NETLINK_LIST_MEMBERSHIPS, NULL, &len) < 0)
return -errno;