public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel•org>
To: netdev@vger•kernel.org
Cc: me@pmachata•org, David Ahern <dsahern@gmail•com>
Subject: [PATCH iproute2-next] Only compile mnl_utils when HAVE_LIBMNL is defined
Date: Wed,  2 Dec 2020 21:11:01 -0700	[thread overview]
Message-ID: <20201203041101.11116-1-dsahern@kernel.org> (raw)

From: David Ahern <dsahern@gmail•com>

New lib/mnl_utils.c fails to compile if libmnl is not installed:

  mnl_utils.c:9:10: fatal error: libmnl/libmnl.h: No such file or directory
      9 | #include <libmnl/libmnl.h>

Make it dependent on HAVE_LIBMNL.

Fixes: 72858c7b77d0 ("lib: Extract from devlink/mnlg a helper, mnlu_socket_open()")
Signed-off-by: David Ahern <dsahern@gmail•com>
---
 lib/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/Makefile b/lib/Makefile
index e37585c6..603ea83e 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -13,7 +13,10 @@ UTILOBJ += bpf_libbpf.o
 endif
 endif
 
-NLOBJ=libgenl.o libnetlink.o mnl_utils.o
+NLOBJ=libgenl.o libnetlink.o
+ifeq ($(HAVE_LIBMNL),y)
+NLOBJ += mnl_utils.o
+endif
 
 all: libnetlink.a libutil.a
 
-- 
2.27.0


             reply	other threads:[~2020-12-03  4:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03  4:11 David Ahern [this message]
2020-12-03 21:45 ` [PATCH iproute2-next] Only compile mnl_utils when HAVE_LIBMNL is defined Petr Machata
2020-12-03 22:39   ` David Ahern

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=20201203041101.11116-1-dsahern@kernel.org \
    --to=dsahern@kernel$(echo .)org \
    --cc=dsahern@gmail$(echo .)com \
    --cc=me@pmachata$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox