From 57a2e910a55f524d06cc29a04d19c9b5f3c60b24 Mon Sep 17 00:00:00 2001 From: Ugric Date: Fri, 14 Aug 2026 00:17:25 +0100 Subject: [PATCH] try fixing for mingw --- libarchive/archive_read_support_format_mtree.c | 2 +- libarchive/archive_string.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libarchive/archive_read_support_format_mtree.c b/libarchive/archive_read_support_format_mtree.c index 5d651235..aba10049 100644 --- a/libarchive/archive_read_support_format_mtree.c +++ b/libarchive/archive_read_support_format_mtree.c @@ -1236,7 +1236,7 @@ parse_file(struct archive_read *a, struct archive_entry *entry, } } #ifdef HAVE_LSTAT - else if (lstat(path, st) == -1) + else if (lstat(path, (struct stat *)st) == -1) #else else if (la_seek_stat(path, st) == -1) #endif diff --git a/libarchive/archive_string.c b/libarchive/archive_string.c index bd57ed94..d6483301 100644 --- a/libarchive/archive_string.c +++ b/libarchive/archive_string.c @@ -448,12 +448,12 @@ default_iconv_charset(const char *charset) { #if HAVE_LOCALE_CHARSET && HAVE_LOCALCHARSET_H && !defined(__APPLE__) /* locale_charset() is broken on Mac OS */ return locale_charset(); -#elif HAVE_NL_LANGINFO +#elif defined(HAVE_LANGINFO_H) && defined(CODESET) return nl_langinfo(CODESET); #elif defined(__BIONIC__) return "UTF-8"; #else - return ""; + return "UTF-8"; #endif }