From 0601defe2efd1bd8a165e9b0c170b05842aa74fc Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Thu, 4 Oct 2018 11:20:38 +0100 Subject: [PATCH] eal: improve musl compatibility of string functions Musl wraps various string functions such as strlcpy in order to harden them. However, the fortify wrappers are included without including the actual string functions being wrapped, which throws missing definition compile errors. Fix by including string.h in string functions header. Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson --- lib/librte_eal/common/include/rte_string_fns.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/librte_eal/common/include/rte_string_fns.h b/lib/librte_eal/common/include/rte_string_fns.h index ecd141b852..9a2a1ff900 100644 --- a/lib/librte_eal/common/include/rte_string_fns.h +++ b/lib/librte_eal/common/include/rte_string_fns.h @@ -16,6 +16,7 @@ extern "C" { #endif #include +#include /** * Takes string "string" parameter and splits it at character "delim" @@ -60,12 +61,10 @@ rte_strlcpy(char *dst, const char *src, size_t size) /* pull in a strlcpy function */ #ifdef RTE_EXEC_ENV_BSDAPP -#include #ifndef __BSD_VISIBLE /* non-standard functions are hidden */ #define strlcpy(dst, src, size) rte_strlcpy(dst, src, size) #endif - #else /* non-BSD platforms */ #ifdef RTE_USE_LIBBSD #include -- 2.20.1