diff options
-rwxr-xr-x | configure | 11 | ||||
-rw-r--r-- | genl/ctrl.c | 3 | ||||
-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 | ||||
-rw-r--r-- | lib/bpf.c | 3 | ||||
-rw-r--r-- | lib/fs.c | 3 | ||||
-rw-r--r-- | lib/inet_proto.c | 3 | ||||
-rw-r--r-- | misc/ss.c | 3 | ||||
-rw-r--r-- | tc/em_ipset.c | 3 | ||||
-rw-r--r-- | tc/m_pedit.c | 3 |
15 files changed, 51 insertions, 2 deletions
@@ -330,8 +330,15 @@ EOF then echo "no" else - echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG - echo "yes" + if ${PKG_CONFIG} libbsd --exists + then + echo 'CFLAGS += -DHAVE_LIBBSD' `${PKG_CONFIG} libbsd --cflags` >>$CONFIG + echo 'LDLIBS +=' `${PKG_CONFIG} libbsd --libs` >> $CONFIG + echo "no" + else + echo 'CFLAGS += -DNEED_STRLCPY' >>$CONFIG + echo "yes" + fi fi rm -f $TMPDIR/strtest.c $TMPDIR/strtest } diff --git a/genl/ctrl.c b/genl/ctrl.c index 6133336a..fef6aaa9 100644 --- a/genl/ctrl.c +++ b/genl/ctrl.c @@ -18,6 +18,9 @@ #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" 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" @@ -15,6 +15,9 @@ #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> @@ -20,6 +20,9 @@ #include <stdlib.h> #include <unistd.h> #include <string.h> +#ifdef HAVE_LIBBSD +#include <bsd/string.h> +#endif #include <errno.h> #include <limits.h> diff --git a/lib/inet_proto.c b/lib/inet_proto.c index 0836a4c9..b379d8f8 100644 --- a/lib/inet_proto.c +++ b/lib/inet_proto.c @@ -18,6 +18,9 @@ #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" @@ -19,6 +19,9 @@ #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> diff --git a/tc/em_ipset.c b/tc/em_ipset.c index 48b287f5..550b2101 100644 --- a/tc/em_ipset.c +++ b/tc/em_ipset.c @@ -20,6 +20,9 @@ #include <netdb.h> #include <unistd.h> #include <string.h> +#ifdef HAVE_LIBBSD +#include <bsd/string.h> +#endif #include <stdlib.h> #include <getopt.h> diff --git a/tc/m_pedit.c b/tc/m_pedit.c index 2aeb56d9..baacc80d 100644 --- a/tc/m_pedit.c +++ b/tc/m_pedit.c @@ -23,6 +23,9 @@ #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" |