Subject: Re: [PATCH iproute2] Use libbsd for strlcpy if available

From: Stephen Hemminger <[email-masked]>
Date: Wed, 31 Oct 2018 08:09:22 -0700

On Mon, 29 Oct 2018 10:46:50 +0000
Luca Boccassi <[email-masked]> wrote:

> If libc does not provide strlcpy check for libbsd with pkg-config to
> avoid relying on inline version.
> 
> Signed-off-by: Luca Boccassi <[email-masked]>
> ---
> 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 <command-line>:
/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