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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user