]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Include bsd/string.h only in include/utils.h
authorLuca Boccassi <bluca@debian.org>
Thu, 1 Nov 2018 22:25:27 +0000 (22:25 +0000)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 5 Nov 2018 16:38:32 +0000 (08:38 -0800)
This is simpler and cleaner, and avoids having to include the header
from every file where the functions are used. The prototypes of the
internal implementation are in this header, so utils.h will have to be
included anyway for those.

Fixes: 508f3c231efb ("Use libbsd for strlcpy if available")
Signed-off-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
15 files changed:
genl/ctrl.c
include/utils.h
ip/iplink.c
ip/ipnetns.c
ip/iproute_lwtunnel.c
ip/ipvrf.c
ip/ipxfrm.c
ip/tunnel.c
ip/xfrm_state.c
lib/bpf.c
lib/fs.c
lib/inet_proto.c
misc/ss.c
tc/em_ipset.c
tc/m_pedit.c

index fef6aaa9c0195a22d45cca6c98f6764e656075b3..6133336ab435539de0df6228a47a8a3086ed40f6 100644 (file)
@@ -18,9 +18,6 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <string.h>
-#ifdef HAVE_LIBBSD
-#include <bsd/string.h>
-#endif
 
 #include "utils.h"
 #include "genl_utils.h"
index 685d2c1d31e7a25d19011cf9be2356fb74c4c858..bf6dea23df66978da960a427335d99b932b3fc6d 100644 (file)
@@ -9,6 +9,10 @@
 #include <stdbool.h>
 #include <time.h>
 
+#ifdef HAVE_LIBBSD
+#include <bsd/string.h>
+#endif
+
 #include "libnetlink.h"
 #include "ll_map.h"
 #include "rtm_map.h"
index 067f5409e569ef42c75711d1c78526e1f036452d..b5519201fef7d6e1a920af3e9d3d6c8c1be1c23e 100644 (file)
@@ -24,9 +24,6 @@
 #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>
index da019d76202294acba5dbfb42ac9462b1f4738f6..0eac18cf268234cb242280c0c1fc4f3347831f1c 100644 (file)
@@ -8,9 +8,6 @@
 #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>
index 2285bc1d5e31eab22a6fbef739ff8e6abfd53292..8f49701509d204bdea966d30c4006cbb7964d772 100644 (file)
@@ -16,9 +16,6 @@
 #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>
index 8572b4f23e3dc494853e9468a5ce2f1bc14f72d5..8a6b7f977b1423da8c1ee0df8379d90ba4716cc0 100644 (file)
@@ -21,9 +21,6 @@
 #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>
index b02f30a65f636e937205c559bc8e9e03b006a85b..17ab4abef4be5c66875e47e69080f407e0d1cd5d 100644 (file)
@@ -28,9 +28,6 @@
 #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>
index 73abb2e272e144f6334059c19c6741f031cdc88f..d0d55f37169e9f522e39453b894b61f9bbf0200e 100644 (file)
@@ -24,9 +24,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#ifdef HAVE_LIBBSD
-#include <bsd/string.h>
-#endif
 #include <unistd.h>
 #include <errno.h>
 #include <sys/types.h>
index 18e0c6fa6a578485cc9f6268279938147c804c36..e8c0174629161db1f43a6ee0304740bd7cf507c9 100644 (file)
@@ -27,9 +27,6 @@
 #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"
index 35d7c45a2924d9644f123fbc4eeebd7fe31bf763..45f279fa4a416a52d3131b3ffe407ae2a9562d47 100644 (file)
--- a/lib/bpf.c
+++ b/lib/bpf.c
@@ -15,9 +15,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
-#ifdef HAVE_LIBBSD
-#include <bsd/string.h>
-#endif
 #include <stdbool.h>
 #include <stdint.h>
 #include <errno.h>
index af36bea0987fa97f2452d71b5db9f1c81be650d1..86efd4ed2ed8084ad147b5d53e62ac2458ccf289 100644 (file)
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -20,9 +20,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
-#ifdef HAVE_LIBBSD
-#include <bsd/string.h>
-#endif
 #include <errno.h>
 #include <limits.h>
 
index b379d8f8e720e2c691345f4a8a0f4d76e8e2706d..0836a4c96a0b486ef9e82f5a9d5eddcd27a23ae1 100644 (file)
@@ -18,9 +18,6 @@
 #include <netinet/in.h>
 #include <netdb.h>
 #include <string.h>
-#ifdef HAVE_LIBBSD
-#include <bsd/string.h>
-#endif
 
 #include "rt_names.h"
 #include "utils.h"
index c472fbd9a8790d1b779a6fa8d96995dfc8cd42d6..4d12fb5d19df29e3575a3594b28dbd5ed30a7749 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -19,9 +19,6 @@
 #include <sys/sysmacros.h>
 #include <netinet/in.h>
 #include <string.h>
-#ifdef HAVE_LIBBSD
-#include <bsd/string.h>
-#endif
 #include <errno.h>
 #include <netdb.h>
 #include <arpa/inet.h>
index 550b2101a057907b163605a2218f056b5fd3d3f4..48b287f5ba3b267259f864d21033672e1287d968 100644 (file)
@@ -20,9 +20,6 @@
 #include <netdb.h>
 #include <unistd.h>
 #include <string.h>
-#ifdef HAVE_LIBBSD
-#include <bsd/string.h>
-#endif
 #include <stdlib.h>
 #include <getopt.h>
 
index baacc80dd94b73b50540b70658c287ce58115bb2..2aeb56d9615f1e9ee4029aa5280c7170fe95e730 100644 (file)
@@ -23,9 +23,6 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <string.h>
-#ifdef HAVE_LIBBSD
-#include <bsd/string.h>
-#endif
 #include <dlfcn.h>
 #include "utils.h"
 #include "tc_util.h"