Skip to content

Commit 624f400

Browse files
committed
fix glibc version checks
1 parent 8494544 commit 624f400

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub fn build(b: *std.Build) void {
109109
.HAVE_DECL_STRVERSCMP = if (target.result.os.tag == .linux or target.result.os.tag == .wasi) true else false,
110110
.HAVE_DECL_VASPRINTF = true,
111111
.HAVE_DECL_VSNPRINTF = true,
112-
.HAVE_DUP3 = if (target.result.isMuslLibC() or (target.result.isGnuLibC() and target.result.os.isAtLeast(.linux, .{ .major = 2, .minor = 9, .patch = 0 }) orelse false)) true else null,
112+
.HAVE_DUP3 = if (target.result.isMuslLibC() or (target.result.isGnuLibC() and target.result.os.version_range.linux.glibc.order(.{ .major = 2, .minor = 9, .patch = 0 }) != .lt)) true else null,
113113
.HAVE_FCNTL_H = true,
114114
.HAVE_FFS = true,
115115
.HAVE_FORK = if (target.result.os.tag != .windows and target.result.os.tag != .wasi) true else null,
@@ -136,7 +136,7 @@ pub fn build(b: *std.Build) void {
136136
.HAVE_MEMSET = true,
137137
.HAVE_MKSTEMPS = switch (target.result.os.tag) {
138138
.windows, .wasi => null,
139-
.linux => if (target.result.abi.isMusl() or (target.result.abi.isGnu() and target.result.os.isAtLeast(.linux, .{ .major = 2, .minor = 11, .patch = 0 }) orelse false)) true else null,
139+
.linux => if (target.result.abi.isMusl() or (target.result.abi.isGnu() and target.result.os.version_range.linux.glibc.order(.{ .major = 2, .minor = 11, .patch = 0 }) != .lt)) true else null,
140140
else => true,
141141
},
142142
.HAVE_MMAP = if (target.result.os.tag == .linux) true else null,

0 commit comments

Comments
 (0)