From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpcmd0756.aruba.it (smtpcmd0756.aruba.it [62.149.156.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECB7F3D565F for ; Wed, 8 Apr 2026 17:38:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.149.156.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775669928; cv=none; b=GjMkMlGN+9/vwjD/ltd8/UAfNB6qXdG3dBDTqht1TAzPpOkyANFdLzL5XOJiTzdcSC6aK+QJruH9qoGW1zfa/c8VoLZX0V9NRdS5i78kkHBDTWFNeIXf331xR6Nzxaix2qhRVwxn/wCju003zG4L+0JGqHL99QioKW1UabXee/g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775669928; c=relaxed/simple; bh=OE4bGBsC/6m3rPeRKR9QkW5yZGvz2Tmkuk6fyZjTb8k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XE2m1GDGTDGZ8AcEQ4OKkF0RMXovrqf2nB4VU55TV8tjA228rWrJ+A6LKxYXPFZCPSAt8GUAKuIuxd2gQk8sj+k/GlnNkyfMMF+U0M/t4T/IB1be+ZIPsvBO97yyG17cDDHC4l5KLlBQAWyLVMc1DtdrOjm0ayj1QkdbvZD4Fos= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=benettiengineering.com; spf=pass smtp.mailfrom=benettiengineering.com; dkim=pass (2048-bit key) header.d=aruba.it header.i=@aruba.it header.b=hG/83mNo; arc=none smtp.client-ip=62.149.156.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=benettiengineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=benettiengineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=aruba.it header.i=@aruba.it header.b="hG/83mNo" Received: from localhost.localdomain ([84.33.84.190]) by Aruba SMTP with ESMTPSA id AWoRwcrFktpTfAWoSwriPH; Wed, 08 Apr 2026 19:35:36 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1775669736; bh=OE4bGBsC/6m3rPeRKR9QkW5yZGvz2Tmkuk6fyZjTb8k=; h=From:To:Subject:Date:MIME-Version; b=hG/83mNozOsDP9P6uatbreG87llyvbiZ7erKi9HXKd4KXKX5GDEc11diYyULOhlz/ Mm+M/3tXZi0z6kJKqvjXzP3bdkLCY2N0NqPOqh5RSUySPfewrMbtLwzNX3OrdAgkgT QvOMIc9oQo/bsxdzx3WKcR0ybW8VbYuXqK2+fcbckwmYIiusp2Xch5CGdnt3vzhiTQ SI4yV3XXpNPEQUSbrOZ5jJikR5yp0FZbRapJPYN+GYt6Ws6YFcoFltPeTFxW8HngjP d5MvTiyj9VZhkuWbfpiK941FZLiMjp/FenMxMvhuwqA47YVozknlNMSxV/rzWdm5ts I/xbFL/w/zGwQ== From: Giulio Benetti To: linux-nfs@vger.kernel.org Cc: Giulio Benetti Subject: [PATCH v2 2/3] Introduce compat.h file to deal with old Linux api and fix build failure due to missing NETLINK_EXT_ACK Date: Wed, 8 Apr 2026 19:35:34 +0200 Message-ID: <20260408173535.3992116-2-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260408173535.3992116-1-giulio.benetti@benettiengineering.com> References: <20260408173535.3992116-1-giulio.benetti@benettiengineering.com> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfAjrBg0BUJCKmUxMEiH5mL8ZtcXEoGQBwUT7zcvYngf+3AjddKmuTmX92KYDd5zc7tW5vKgoa+Svv8Inx5dhr2cIov/N92tYSM6AiLfysDRpj4/6TQEJ wgNDRlrcgb0R9JT2oDJpXuJMkcv9aziBEg3KT2/kWX6Fw7vzN8ReTxUWvD9iUxgItmP5RDUD86L9T2ybsqSPXGfa4XdcK+wwJMYw+dMqxuA+KY6bT8xLsW82 /cIIeHyOPAz0qFDfyxmTnZyj77xSy9vVLy0ApoZfxkHiAPL+643mys/uVDeXfag/ In "compat.h" check if NETLINK_EXT_ACK exists, otherwise define it to fix build failure and where at the moment is included let's include "compat.h" Signed-off-by: Giulio Benetti --- V1->V2: * include "compat.h" in place of --- support/export/cache.c | 2 +- support/export/cache_flush.c | 2 ++ support/include/compat.h | 10 ++++++++++ utils/nfsdctl/nfsdctl.c | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 support/include/compat.h diff --git a/support/export/cache.c b/support/export/cache.c index 2f128d7d..65008f51 100644 --- a/support/export/cache.c +++ b/support/export/cache.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include "compat.h" #ifdef USE_SYSTEM_NFSD_NETLINK_H #include diff --git a/support/export/cache_flush.c b/support/export/cache_flush.c index ed7b964f..2a24dec7 100644 --- a/support/export/cache_flush.c +++ b/support/export/cache_flush.c @@ -38,6 +38,8 @@ extern int no_netlink; #include "sunrpc_netlink.h" #endif +#include "compat.h" + static int nl_send_flush(struct nl_sock *sock, int family, int cmd) { struct nl_msg *msg; diff --git a/support/include/compat.h b/support/include/compat.h new file mode 100644 index 00000000..83229b65 --- /dev/null +++ b/support/include/compat.h @@ -0,0 +1,10 @@ +#ifndef COMPAT_H +#define COMPAT_H + +#include + +#ifndef NETLINK_EXT_ACK +#define NETLINK_EXT_ACK 11 +#endif + +#endif /* COMPAT_H */ diff --git a/utils/nfsdctl/nfsdctl.c b/utils/nfsdctl/nfsdctl.c index 016dd2eb..c7126748 100644 --- a/utils/nfsdctl/nfsdctl.c +++ b/utils/nfsdctl/nfsdctl.c @@ -26,6 +26,7 @@ #include #include #include +#include "compat.h" #include #include -- 2.47.3