Skip to content

RediWM is a Wayland compositor written in Zig (OpenGL ES) that includes everything in one process

Gentoo build fix

oxydizer35ff469d4cdb
diff --git a/build/apps.zig b/build/apps.zig
index f307178..7d2e3cf 100644
--- a/build/apps.zig
+++ b/build/apps.zig
@@ -49,7 +49,11 @@ pub fn add(ctx: Context) Apps {
torrents.addArg("-g");
torrents.addArg("-D_GLIBCXX_ASSERTIONS");
torrents.addArg("-fstack-protector-strong");
- if (optimize != .debug) torrents.addArg("-D_FORTIFY_SOURCE=3");
+ if (optimize != .debug) {
+ // Distro compilers may predefine fortification; replace it explicitly.
+ torrents.addArg("-U_FORTIFY_SOURCE");
+ torrents.addArg("-D_FORTIFY_SOURCE=3");
+ }
inline for (.{ "helper.cpp", "helper_transfers.cpp", "helper_peers.cpp", "helper_tray.cpp" }) |part| torrents.addFileArg(b.path("src/files/torrent/" ++ part));
torrents.addFileInput(b.path("src/files/torrent/helper.hpp"));
torrents.addArg("-o");