We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
v examples/hello_world.v
1 parent 8f4fe61 commit d07a96eCopy full SHA for d07a96e
vlib/v/gen/c/cgen.v
@@ -5879,7 +5879,8 @@ fn (mut g Gen) write_init_function() {
5879
// ___argv is declared as voidptr here, because that unifies the windows/unix logic
5880
g.writeln('void _vinit(int ___argc, voidptr ___argv) {')
5881
5882
- g.writeln('#if __STDC_HOSTED__ == 1\n\tsignal(SIGSEGV, v_segmentation_fault_handler);\n#endif')
+ // 11 is SIGSEGV. It is hardcoded here, to avoid FreeBSD compilation errors for trivial examples.
5883
+ g.writeln('#if __STDC_HOSTED__ == 1\n\tsignal(11, v_segmentation_fault_handler);\n#endif')
5884
if g.pref.prealloc {
5885
g.writeln('prealloc_vinit();')
5886
}
0 commit comments