Skip to content

Commit

Permalink
build: fix errors when building against glibc
Browse files Browse the repository at this point in the history
  • Loading branch information
ripperi committed Nov 4, 2024
1 parent f83a108 commit 689bbe9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/avahi/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,8 @@ pub fn build(b: *std.Build) void {
avahi.root_module.addCMacro("HAVE_DBUS_CONNECTION_CLOSE", "0");
avahi.root_module.addCMacro("HAVE_EXPAT_H", "1");
avahi.root_module.addCMacro("HAVE_CONFIG_H", "1");
avahi.root_module.addCMacro("HAVE_STRLCPY", "1");
if (!t.isGnu())
avahi.root_module.addCMacro("HAVE_STRLCPY", "1");

const avahi_config_h = b.addConfigHeader(.{
.style = .blank,
Expand Down
4 changes: 4 additions & 0 deletions ext/h2o/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ pub fn build(b: *std.Build) !void {
.files = &.{"cloexec.c"},
.flags = &.{
"-fno-sanitize=all",
if (t.isGnu())
"-D_GNU_SOURCE"
else
"",
},
});

Expand Down

0 comments on commit 689bbe9

Please sign in to comment.