diff --git a/licenses.txt b/licenses.txt index 93caa3bb683f69e316307c76fcc3c6eb47084ddc..4e2267720b042c6abdcf37c0b34042989ca1946e 100644 --- a/licenses.txt +++ b/licenses.txt @@ -1,10 +1,8 @@ MIT: = https://spdx.org/licenses/MIT - This -- git https://github.com/nektro/zig-errno - git https://github.com/nektro/zig-extras -- git https://github.com/nektro/zig-libc -- git https://github.com/nektro/zig-sys-libc +- git https://github.com/nektro/zig-sys-linux Unspecified: - system_lib c diff --git a/src/lib.zig b/src/lib.zig index a6355133ded102568be148b4030743e311b6aadc..65912cc31db67962423cd837cfe8f21a9fee20d7 100644 --- a/src/lib.zig +++ b/src/lib.zig @@ -2,7 +2,7 @@ const std = @import("std"); const string = []const u8; const List = std.ArrayList(string); const extras = @import("extras"); -const libc = @import("sys-libc"); +const linux = @import("sys-linux"); var singles: std.StringArrayHashMap(string) = undefined; var multis: std.StringArrayHashMap(List) = undefined; @@ -68,7 +68,7 @@ pub fn parse(k: FlagDashKind) !std.process.ArgIterator { } } std.log.err("Unrecognized argument: {s}{s}", .{ dash, name }); - libc.exit(1); + linux.exit(1); } return argiter; } @@ -79,7 +79,7 @@ pub fn parseEnv() !void { for (singles.keys(), singles.values()) |k, *v| { const u = try fixNameForEnv(alloc, k); defer alloc.free(u); - if (libc.getenv(u)) |value| { + if (linux.getenv(u)) |value| { v.* = value; } } @@ -90,7 +90,7 @@ pub fn parseEnv() !void { defer alloc.free(u); const w = try std.fmt.allocPrintZ(alloc, "{s}_{d}", .{ u, n }); defer alloc.free(w); - if (libc.getenv(w)) |value| { + if (linux.getenv(w)) |value| { try v.append(value); continue; } diff --git a/zig.mod b/zig.mod index adbb0b96ee0121c2e55fd07764d3c2d1b0ff1d39..2b8b3c69609a6e70e86c4e2630a2d65dceeda624 100644 --- a/zig.mod +++ b/zig.mod @@ -5,4 +5,4 @@ license: MIT description: Config management for Zig. dependencies: - src: git https://github.com/nektro/zig-extras - - src: git https://github.com/nektro/zig-sys-libc + - src: git https://github.com/nektro/zig-sys-linux