All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <steved@redhat.com>
To: Giulio Benetti <giulio.benetti@benettiengineering.com>,
	linux-nfs@vger.kernel.org
Subject: Re: [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: Fri, 15 May 2026 08:52:04 -0400	[thread overview]
Message-ID: <f4e9f9ab-794a-4e56-8a52-660a5978f6f7@redhat.com> (raw)
In-Reply-To: <20260408173535.3992116-2-giulio.benetti@benettiengineering.com>



On 4/8/26 1:35 PM, Giulio Benetti wrote:
> In "compat.h" check if NETLINK_EXT_ACK exists, otherwise define it to fix
> build failure and where at the moment <linux/netlink.h> is included
> let's include "compat.h"
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Committed (tag: nfs-utils-2-9-2-rc3)

steved
> ---
> V1->V2:
> * include "compat.h" in place of <linux/netlink.h>
> ---
>   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 <netlink/genl/ctrl.h>
>   #include <netlink/msg.h>
>   #include <netlink/attr.h>
> -#include <linux/netlink.h>
> +#include "compat.h"
>   
>   #ifdef USE_SYSTEM_NFSD_NETLINK_H
>   #include <linux/nfsd_netlink.h>
> 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 <linux/netlink.h>
> +
> +#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 <netlink/msg.h>
>   #include <netlink/attr.h>
>   #include <linux/netlink.h>
> +#include "compat.h"
>   
>   #include <readline/readline.h>
>   #include <readline/history.h>


  reply	other threads:[~2026-05-15 12:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08 17:35 [PATCH v2 1/3] fh_key_file: fix missing string.h inclusion Giulio Benetti
2026-04-08 17:35 ` [PATCH v2 2/3] Introduce compat.h file to deal with old Linux api and fix build failure due to missing NETLINK_EXT_ACK Giulio Benetti
2026-05-15 12:52   ` Steve Dickson [this message]
2026-04-08 17:35 ` [PATCH v2 3/3] support/backend_sqlite.c: fix getrandom() fallback Giulio Benetti
2026-05-15 12:52   ` Steve Dickson
2026-05-15 12:52 ` [PATCH v2 1/3] fh_key_file: fix missing string.h inclusion Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f4e9f9ab-794a-4e56-8a52-660a5978f6f7@redhat.com \
    --to=steved@redhat.com \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.