kernel_setsockopt removed in cb8e59cc [ 13s] /home/abuild/rpmbuild/BUILD/drbd-9.0.24~1+git.17730ea3/default/drbd_transport_tcp.c: In function 'dtt_nodelay': [ 13s] /home/abuild/rpmbuild/BUILD/drbd-9.0.24~1+git.17730ea3/default/drbd_transport_tcp.c:158:9: error: implicit declaration of funct ion 'kernel_setsockopt'; did you mean 'kernel_getsockname'? [-Werror=implicit-function-declaration] [ 13s] 158 | (void) kernel_setsockopt(socket, SOL_TCP, TCP_NODELAY, (char *)&val, sizeof(val)); [ 13s] | ^~~~~~~~~~~~~~~~~ [ 13s] | kernel_getsockname [ 14s] cc1: some warnings being treated as errors In 518846b54, some kernel_setsockopt() are removed, but not all... diff -Naur drbd-9.0.26~0+git.9114a038.orig/drbd/drbd_transport_tcp.c drbd-9.0.26~0+git.9114a038/drbd/drbd_transport_tcp.c --- drbd-9.0.26~0+git.9114a038.orig/drbd/drbd_transport_tcp.c 2020-12-09 14:06:22.117468473 +0800 +++ drbd-9.0.26~0+git.9114a038/drbd/drbd_transport_tcp.c 2020-12-09 14:06:54.989546999 +0800 @@ -883,7 +883,6 @@ struct socket *dsocket, *csocket; struct net_conf *nc; int timeout, err; - int one = 1; bool ok; dsocket = NULL; @@ -1065,9 +1064,14 @@ dsocket->sk->sk_sndtimeo = timeout; csocket->sk->sk_sndtimeo = timeout; +#ifndef COMPAT_HAVE_TCP_SOCK_SET_CORK + int one = 1; err = kernel_setsockopt(dsocket, SOL_SOCKET, SO_KEEPALIVE, (char *)&one, sizeof(one)); if (err) tr_warn(transport, "Failed to enable SO_KEEPALIVE %d\n", err); +#else + sock_set_keepalive(dsocket->sk); +#endif return 0;