From abfc58cad424fb9a023d0334e20fd34d63f887a7 Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Sat, 4 May 2019 18:25:17 +0200 Subject: [PATCH] stream_libarchive: Always use LC_CTYPE_MASK for libarchive Using LC_ALL_MASK is unnecessary and unreliable on some systems. Signed-off-by: James Hilliard --- osdep/io.h | 1 - stream/stream_libarchive.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/osdep/io.h b/osdep/io.h index a1c65f18e9..8699fb3e4a 100644 --- a/osdep/io.h +++ b/osdep/io.h @@ -193,7 +193,6 @@ int msync(void *addr, size_t length, int flags); // These are stubs since there is not anything that helps with this on Windows. #define locale_t int -#define LC_ALL_MASK 0 #define LC_CTYPE_MASK 0 locale_t newlocale(int, const char *, locale_t); locale_t uselocale(locale_t); diff --git a/stream/stream_libarchive.c b/stream/stream_libarchive.c index bc1fb94d12..35ac4d5528 100644 --- a/stream/stream_libarchive.c +++ b/stream/stream_libarchive.c @@ -243,7 +243,7 @@ struct mp_archive *mp_archive_new(struct mp_log *log, struct stream *src, { struct mp_archive *mpa = talloc_zero(NULL, struct mp_archive); mpa->log = log; - mpa->locale = newlocale(LC_ALL_MASK, "C.UTF-8", (locale_t)0); + mpa->locale = newlocale(LC_CTYPE_MASK, "C.UTF-8", (locale_t)0); if (!mpa->locale) { mpa->locale = newlocale(LC_CTYPE_MASK, "", (locale_t)0); if (!mpa->locale)