diff options
author | Luca Boccassi <bluca@debian.org> | 2018-10-31 18:00:11 +0000 |
---|---|---|
committer | Stephen Hemminger <stephen@networkplumber.org> | 2018-11-01 12:47:03 -0700 |
commit | 508f3c231efb179fb842d222e8151b395937b136 (patch) | |
tree | e82c7ea91c486ae6c0af618f3c76a069915761b7 /ip | |
parent | 7a04dd84a7f938f72fcef9efe8383314b0a66274 (diff) |
Use libbsd for strlcpy if available
If libc does not provide strlcpy check for libbsd with pkg-config to
avoid relying on inline version.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'ip')
-rw-r--r-- | ip/iplink.c | 3 | ||||
-rw-r--r-- | ip/ipnetns.c | 3 | ||||
-rw-r--r-- | ip/iproute_lwtunnel.c | 3 | ||||
-rw-r--r-- | ip/ipvrf.c | 3 | ||||
-rw-r--r-- | ip/ipxfrm.c | 3 | ||||
-rw-r--r-- | ip/tunnel.c | 3 | ||||
-rw-r--r-- | ip/xfrm_state.c | 3 |
7 files changed, 21 insertions, 0 deletions
diff --git a/ip/iplink.c b/ip/iplink.c index b5519201..067f5409 100644 --- a/ip/iplink.c +++ b/ip/iplink.c @@ -24,6 +24,9 @@ #include <netinet/in.h> #include <arpa/inet.h> #include <string.h> +#ifdef HAVE_LIBBSD +#include <bsd/string.h> +#endif #include <sys/ioctl.h> #include <stdbool.h> #include <linux/mpls.h> diff --git a/ip/ipnetns.c b/ip/ipnetns.c index 0eac18cf..da019d76 100644 --- a/ip/ipnetns.c +++ b/ip/ipnetns.c @@ -8,6 +8,9 @@ #include <sys/syscall.h> #include <stdio.h> #include <string.h> +#ifdef HAVE_LIBBSD +#include <bsd/string.h> +#endif #include <sched.h> #include <fcntl.h> #include <dirent.h> diff --git a/ip/iproute_lwtunnel.c b/ip/iproute_lwtunnel.c index 8f497015..2285bc1d 100644 --- a/ip/iproute_lwtunnel.c +++ b/ip/iproute_lwtunnel.c @@ -16,6 +16,9 @@ #include <unistd.h> #include <fcntl.h> #include <string.h> +#ifdef HAVE_LIBBSD +#include <bsd/string.h> +#endif #include <linux/ila.h> #include <linux/lwtunnel.h> #include <linux/mpls_iptunnel.h> @@ -21,6 +21,9 @@ #include <stdlib.h> #include <unistd.h> #include <string.h> +#ifdef HAVE_LIBBSD +#include <bsd/string.h> +#endif #include <dirent.h> #include <errno.h> #include <limits.h> diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c index 17ab4abe..b02f30a6 100644 --- a/ip/ipxfrm.c +++ b/ip/ipxfrm.c @@ -28,6 +28,9 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#ifdef HAVE_LIBBSD +#include <bsd/string.h> +#endif #include <sys/types.h> #include <sys/socket.h> #include <time.h> diff --git a/ip/tunnel.c b/ip/tunnel.c index d0d55f37..73abb2e2 100644 --- a/ip/tunnel.c +++ b/ip/tunnel.c @@ -24,6 +24,9 @@ #include <stdio.h> #include <string.h> +#ifdef HAVE_LIBBSD +#include <bsd/string.h> +#endif #include <unistd.h> #include <errno.h> #include <sys/types.h> diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c index e8c01746..18e0c6fa 100644 --- a/ip/xfrm_state.c +++ b/ip/xfrm_state.c @@ -27,6 +27,9 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#ifdef HAVE_LIBBSD +#include <bsd/string.h> +#endif #include <netdb.h> #include "utils.h" #include "xfrm.h" |