- Update libxev dependency

- Fixup macos compile error
This commit is contained in:
kcbanner
2023-10-31 19:32:34 -04:00
committed by Mitchell Hashimoto
parent 232df8de8f
commit 9a5322eaf4
2 changed files with 7 additions and 5 deletions

View File

@@ -21,8 +21,10 @@ pub fn ensureLocale(alloc: std.mem.Allocator) !void {
// process.
if (comptime builtin.target.isDarwin()) {
// Set the lang if it is not set or if its empty.
if (lang.len == 0) {
setLangFromCocoa();
if (lang) |l| {
if (l.len == 0) {
setLangFromCocoa();
}
}
}
@@ -98,7 +100,7 @@ fn setLangFromCocoa() void {
log.info("detected system locale={s}", .{env_value});
// Set it onto our environment
if (internal_os.setEnv("LANG", env_value.ptr) < 0) {
if (internal_os.setEnv("LANG", env_value) < 0) {
log.err("error setting locale env var", .{});
return;
}