From ec2fc39fe4f4e6e242b3a669585049763968cdeb Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Tue, 10 Jan 2023 11:23:41 +0200 Subject: xz: Include in suffix.c if needed for strcasecmp(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SUSv2 and POSIX.1‐2017 declare only a few functions in . Of these, strcasecmp() is used on some platforms in suffix.c. Nothing else in the project needs (at least if building on a modern system). sysdefs.h currently includes if HAVE_STRINGS_H is defined and suffix.c relied on this. Note that dos/config.h doesn't #define HAVE_STRINGS_H even though DJGPP does have strings.h. It isn't needed with DJGPP as strcasecmp() is also in in DJGPP. --- src/xz/suffix.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/xz/suffix.c') diff --git a/src/xz/suffix.c b/src/xz/suffix.c index 6bb35d42..09add381 100644 --- a/src/xz/suffix.c +++ b/src/xz/suffix.c @@ -18,6 +18,9 @@ // For case-insensitive filename suffix on case-insensitive systems #if defined(TUKLIB_DOSLIKE) || defined(__VMS) +# ifdef HAVE_STRINGS_H +# include +# endif # define strcmp strcasecmp #endif -- cgit v1.2.3