mirror_iproute2/lib
Baruch Siach 4f6b73380d lib: fix multiple strlcpy definition
Some C libraries, like uClibc and musl, provide BSD compatible
strlcpy(). Add check_strlcpy() to configure, and avoid defining strlcpy
and strlcat when the C library provides them.

This fixes the following static link error with uClibc-ng:

.../sysroot/usr/lib/libc.a(strlcpy.os): In function `strlcpy':
strlcpy.c:(.text+0x0): multiple definition of `strlcpy'
../lib/libutil.a(utils.o):utils.c:(.text+0x1ddc): first defined here
collect2: error: ld returned 1 exit status

Acked-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2017-10-11 11:02:13 -07:00
..
bpf.c bpf: properly output json for xdp 2017-09-22 10:07:15 -07:00
color.c color: add new COLOR_NONE and disable_color function 2017-08-17 18:02:40 -07:00
coverity_model.c scrub out whitespace issues 2016-03-27 10:50:14 -07:00
dnet_ntop.c scrub out whitespace issues 2016-03-27 10:50:14 -07:00
dnet_pton.c dnet: fix strict aliasing warnings 2010-07-23 12:30:48 -07:00
exec.c move cmd_exec to lib utils 2016-12-13 10:20:16 -08:00
fs.c Convert the obvious cases to strlcpy() 2017-09-01 12:10:54 -07:00
inet_proto.c Convert the obvious cases to strlcpy() 2017-09-01 12:10:54 -07:00
ipx_ntop.c scrub out whitespace issues 2016-03-27 10:50:14 -07:00
ipx_pton.c utils: provide get_hex to read a hex digit from a char 2016-06-08 09:30:41 -07:00
json_print.c lib: json_print: rework 'new_json_obj' drop FILE* argument 2017-09-29 10:10:47 -07:00
json_writer.c json_writer: add new json handlers (null, float with format, lluint, hu) 2017-08-17 18:02:40 -07:00
libgenl.c libgenl: introduce genl_init_handle 2016-08-17 13:59:21 -07:00
libnetlink.c lib/libnetlink: Don't pass NULL parameter to memcpy() 2017-08-24 15:22:10 -07:00
ll_addr.c remove duplicated #include's 2017-07-18 17:17:15 -07:00
ll_map.c lib/ll_map: Choose size of new cache items at run-time 2017-08-24 14:53:14 -07:00
ll_proto.c remove duplicated #include's 2017-07-18 17:17:15 -07:00
ll_types.c remove duplicated #include's 2017-07-18 17:17:15 -07:00
Makefile json: move json printer to common library 2017-09-22 10:06:43 -07:00
mpls_ntop.c ip: mpls: fix printing of mpls labels 2017-05-11 11:08:02 -07:00
mpls_pton.c ip: add support for more MPLS labels 2017-05-22 11:03:02 -07:00
names.c Replace malloc && memset by calloc 2016-07-20 12:05:24 -07:00
namespace.c lib/namespace: fix fd leakage in non-error case 2015-08-19 16:32:56 -07:00
rt_names.c lib/rt_names: Drop dead code in rtnl_rttable_n2a() 2017-08-21 17:12:21 -07:00
utils.c lib: fix multiple strlcpy definition 2017-10-11 11:02:13 -07:00