mozc: fix getpw for musl

Fix: #56017
This commit is contained in:
Đoàn Trần Công Danh 2025-06-30 11:46:00 +07:00
parent 681699ea33
commit 4237e73dca
2 changed files with 15 additions and 1 deletions

View file

@ -0,0 +1,14 @@
--- a/mozc/src/base/system_util.cc
+++ b/mozc/src/base/system_util.cc
@@ -526,7 +526,11 @@ std::string SystemUtil::GetUserNameAsStr
DCHECK_NE(FALSE, result);
return win32::WideToUtf8(wusername);
#else // _WIN32
+#if defined(__linux__) && !defined(__GLIBC__)
+ const int bufsize = 1024;
+#else
const int bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);
+#endif
CHECK_NE(bufsize, -1);
absl::FixedArray<char> buf(bufsize);
struct passwd pw, *ppw;

View file

@ -4,7 +4,7 @@ reverts="2.32.5851.102_1"
# src/data/version/mozc_version_template.bzl
# revision is always 102, template always says 100 ;)
version=2.31.5851.102
revision=1
revision=2
_commit=6a2e6e292efe4c2048e0c86b0818a4897c4aa5b7
_abseil=20250512.0
_protobuf_commit=74211c0dfc2777318ab53c2cd2c317a2ef9012de