From patchwork Thu Dec 3 04:11:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Ahern X-Patchwork-Id: 11947717 X-Patchwork-Delegate: dsahern@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06DFFC64E7A for ; Thu, 3 Dec 2020 04:11:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 998E621D91 for ; Thu, 3 Dec 2020 04:11:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728199AbgLCELq (ORCPT ); Wed, 2 Dec 2020 23:11:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:41078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726977AbgLCELq (ORCPT ); Wed, 2 Dec 2020 23:11:46 -0500 From: David Ahern Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: netdev@vger.kernel.org Cc: me@pmachata.org, David Ahern Subject: [PATCH iproute2-next] Only compile mnl_utils when HAVE_LIBMNL is defined Date: Wed, 2 Dec 2020 21:11:01 -0700 Message-Id: <20201203041101.11116-1-dsahern@kernel.org> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: dsahern@gmail.com From: David Ahern 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 Make it dependent on HAVE_LIBMNL. Fixes: 72858c7b77d0 ("lib: Extract from devlink/mnlg a helper, mnlu_socket_open()") Signed-off-by: David Ahern --- 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