From b2e63f02aa6c036b5181e6f78b2413693ca290a2 Mon Sep 17 00:00:00 2001 From: Vyronas Tsingaras Date: Thu, 8 Dec 2016 12:16:55 +0200 Subject: [PATCH] Fix build for RHEL kernels. --- forge_socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forge_socket.c b/forge_socket.c index d7b74fd..2457e13 100644 --- a/forge_socket.c +++ b/forge_socket.c @@ -27,7 +27,7 @@ static struct inet_protosw forge_sw = { .protocol = IPPROTO_TCP, .prot = &forge_prot, .ops = &inet_forge_ops, -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) +#if !(LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,0)) .no_check = 0, #endif .flags = INET_PROTOSW_ICSK, @@ -261,7 +261,7 @@ int forge_setsockopt(struct sock *sk, int level, int optname, tcp_prequeue_init(tp); -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) +#if !(LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,0)) tp->srtt = 0; tp->mdev = TCP_TIMEOUT_INIT; #else