Skip to content

Commit e07973c

Browse files
committed
fix expat build issue
``` install └─ install wayland-scanner └─ zig build-exe wayland-scanner Debug native └─ zig build-lib expat Debug native └─ configure cmake header dependency to expat_config.h failure error: /home/user/.cache/zig/p/1220ac6fead249f922d08168f43295090ba7d6e7567e0314dc06cf2fb9ce11ed2bea/expat/expat_config.h.cmake:7: unable to substitute variable: error: MissingValue error: /home/user/.cache/zig/p/1220ac6fead249f922d08168f43295090ba7d6e7567e0314dc06cf2fb9ce11ed2bea/expat/expat_config.h.cmake:120: unable to substitute variable: error: MissingValue error: /home/user/.cache/zig/p/1220ac6fead249f922d08168f43295090ba7d6e7567e0314dc06cf2fb9ce11ed2bea/expat/expat_config.h.cmake:123: unable to substitute variable: error: MissingValue error: HeaderConfigFailed ```
1 parent 30da838 commit e07973c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

build/wayland_scanner/build.zig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ pub fn build(b: *std.Build) !void {
3434
.style = .{ .cmake = expat_dep.path("expat/expat_config.h.cmake") },
3535
.include_path = "expat_config.h",
3636
}, .{
37+
.BYTEORDER = @as(i64, switch (b.graph.host.result.cpu.arch.endian()) {
38+
.little => 1234,
39+
.big => 4321,
40+
}),
41+
.off_t = null,
42+
.size_t = "unsigned",
43+
3744
.HAVE_STDLIB_H = 1,
3845
.HAVE_STRINGS_H = 1,
3946
.HAVE_STRING_H = 1,

0 commit comments

Comments
 (0)