From: Issam E. Maghni Date: Sat, 24 Apr 2021 01:46:48 +0000 (+1000) Subject: escape.c: Fix missing nl_langinfo on certain configs X-Git-Tag: v4.0.0~204 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c36ab4fc7366cb9389272d3178dbcac0c3b5cfd;p=procps-ng escape.c: Fix missing nl_langinfo on certain configs nl_langinfo and CODESET are undefined in a musl system. Instead of uncondionally including langinfo.h, this change includes include/nls.h which has the tests and work-arounds for systems that don't have these features. This is similar to how other programs within procps include langinfo.h via nls.h References: procps-ng/procps!130 Signed-off-by: Craig Small --- diff --git a/proc/escape.c b/proc/escape.c index 32961a3b..6c903a32 100644 --- a/proc/escape.c +++ b/proc/escape.c @@ -18,13 +18,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include #include #include #include "escape.h" #include "readproc.h" +#include "nls.h" #define SECURE_ESCAPE_ARGS(dst, bytes) do { \ if ((bytes) <= 0) return 0; \