From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH iproute2] Use libbsd for strlcpy if available Date: Wed, 31 Oct 2018 08:09:22 -0700 Message-ID: <20181031080922.2ff123eb@xeon-e3> References: <20181029104650.24924-1-bluca@debian.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, dsahern@gmail.com To: Luca Boccassi Return-path: Received: from mail-pl1-f195.google.com ([209.85.214.195]:43638 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728649AbeKAAIW (ORCPT ); Wed, 31 Oct 2018 20:08:22 -0400 Received: by mail-pl1-f195.google.com with SMTP id g59-v6so3421389plb.10 for ; Wed, 31 Oct 2018 08:09:58 -0700 (PDT) In-Reply-To: <20181029104650.24924-1-bluca@debian.org> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 29 Oct 2018 10:46:50 +0000 Luca Boccassi wrote: > If libc does not provide strlcpy check for libbsd with pkg-config to > avoid relying on inline version. > > Signed-off-by: Luca Boccassi > --- > This allows distro maintainers to be able to choose to reduce > duplication and let this code be maintained in one place, in the > external library. > I like the idea, but it causes warnings on Debian testing, and maybe other distros. ipnetns.c:2: warning: "_ATFILE_SOURCE" redefined #define _ATFILE_SOURCE In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33, from /usr/include/string.h:26, from /usr/include/bsd/string.h:30, from : /usr/include/features.h:326: note: this is the location of the previous definition # define _ATFILE_SOURCE 1 Please figure out how to handle this and resubmit. SUSE open build service might also work to test multiple distro's