void-packages/srcpkgs/pdfgrep/patches/fix-musl.patch

13 lines
409 B
Diff

--- a/src/pdfgrep.cc
+++ b/src/pdfgrep.cc
@@ -460,7 +460,9 @@ int main(int argc, char** argv)
// Set locale to user-preference. If this locale is an UTF-8 locale, the
// regex-functions regcomp/regexec become unicode aware, which means
// e.g. that '.' will match a unicode character, not a single byte.
+#ifdef __GLIBC__
locale::global(locale(""));
+#endif
enum re_engine_type {
RE_POSIX = 0,