From: Stephen Hemminger <stephen@networkplumber.org>
To: netdev@vger.kernel.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH iproute2] configure: require libmnl
Date: Thu, 31 May 2018 15:32:09 -0400 [thread overview]
Message-ID: <20180531193209.27406-1-stephen@networkplumber.org> (raw)
Several users of BPF and other features are trying to build without
libmnl, then complaining that features don't work. The time has
come to require libmnl to build iproute2.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
configure | 20 +++++++++++---------
lib/libnetlink.c | 10 ----------
2 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/configure b/configure
index 5ef5cd4cf9cd..209d78b6bf19 100755
--- a/configure
+++ b/configure
@@ -281,16 +281,18 @@ check_selinux()
check_mnl()
{
- if ${PKG_CONFIG} libmnl --exists
- then
- echo "HAVE_MNL:=y" >>$CONFIG
- echo "yes"
+ if ${PKG_CONFIG} libmnl --exists
+ then
+ echo "HAVE_MNL:=y" >>$CONFIG
+ echo "yes"
- echo 'CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG
- echo 'LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG
- else
- echo "no"
- fi
+ echo 'CFLAGS += -DHAVE_LIBMNL' `${PKG_CONFIG} libmnl --cflags` >>$CONFIG
+ echo 'LDLIBS +=' `${PKG_CONFIG} libmnl --libs` >> $CONFIG
+ else
+ echo "no"
+ echo "libmnl is required. please install libmnl-dev or libmnl-devel" 1>&2
+ exit 1
+ fi
}
check_berkeley_db()
diff --git a/lib/libnetlink.c b/lib/libnetlink.c
index 928de1dd16d8..ab8ea85d5dd9 100644
--- a/lib/libnetlink.c
+++ b/lib/libnetlink.c
@@ -35,7 +35,6 @@
int rcvbuf = 1024 * 1024;
-#ifdef HAVE_LIBMNL
#include <libmnl/libmnl.h>
static const enum mnl_attr_data_type extack_policy[NLMSGERR_ATTR_MAX + 1] = {
@@ -116,15 +115,6 @@ int nl_dump_ext_ack(const struct nlmsghdr *nlh, nl_ext_ack_fn_t errfn)
return 0;
}
-#else
-#warning "libmnl required for error support"
-
-/* No extended error ack without libmnl */
-int nl_dump_ext_ack(const struct nlmsghdr *nlh, nl_ext_ack_fn_t errfn)
-{
- return 0;
-}
-#endif
void rtnl_close(struct rtnl_handle *rth)
{
--
2.17.0
next reply other threads:[~2018-05-31 19:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-31 19:32 Stephen Hemminger [this message]
2018-06-05 18:15 ` [PATCH iproute2] configure: require libmnl Simon Horman
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=20180531193209.27406-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox