The example doesn’t work for me with or without -lc (I’m on Zig 0.9.1, should that be relevant), but I do admit I missed the -lc part of the issue on first reading
The issue I get with your first code snippet is that std.os.sigprocmask() doesn’t exist – you have to get it from the system-specific implementation, if any, so either directly std.os.linux.sigprocmask() or std.c.sigprocmask(), or implicitly via std.os.system.sigprocmask(), as std.os.system will just alias the system-specific struct that contains the underlying syscalls.
Fixing that, and the discarded value from the sigProcMask() call, it compiles fine, and I don’t get any errors from c_int conversions. Can’t reproduce
Right, I can reproduce on the latest master build. The issue is that Zig seems to have grown a std.os.sigprocmask() convenience wrapper which delegates to the underlying system-specific sigprocmask() and translates errno into an actual Zig error…
…but, the underlying std.c.sigprocmask() expects a c_int as its first parameter, while the convenience wrapper takes that value as a u32, thus the type clash.
This sounds like a bug in the convenience wrappers: the reason an @as(c_int, std.os.SIG.BLOCK) type coercion won’t help is that the method signature takes a u32 for that parameter, so it’ll be immediately type coerced back from c_int to u32…
A cheap workaround is to copy the stdlib’s implementation in your own code and change the parameter type, but this ought to be fixed in the stdlib instead. Maybe you can open an issue on GitHub detailing the problem