| ... | @@ -11,22 +11,6 @@ const c = std.c; | ... | @@ -11,22 +11,6 @@ const c = std.c; |
| 11 | | 11 | |
| 12 | pub const FILE = c.FILE; | 12 | pub const FILE = c.FILE; |
| 13 | | 13 | |
| 14 | var __stack_chk_guard: usize = 0; | | |
| 15 | fn __stack_chk_fail() callconv(.c) void { | | |
| 16 | std.debug.print("stack smashing detected: terminated\n", .{}); | | |
| 17 | emscripten_force_exit(127); | | |
| 18 | } | | |
| 19 | | | |
| 20 | comptime { | | |
| 21 | if (builtin.os.tag == .emscripten) { | | |
| 22 | if (builtin.mode == .Debug or builtin.mode == .ReleaseSafe) { | | |
| 23 | // Emscripten does not provide these symbols, so we must export our own | | |
| 24 | @export(&__stack_chk_guard, .{ .name = "__stack_chk_guard", .linkage = .strong }); | | |
| 25 | @export(&__stack_chk_fail, .{ .name = "__stack_chk_fail", .linkage = .strong }); | | |
| 26 | } | | |
| 27 | } | | |
| 28 | } | | |
| 29 | | | |
| 30 | pub const PF = linux.PF; | 14 | pub const PF = linux.PF; |
| 31 | pub const AF = linux.AF; | 15 | pub const AF = linux.AF; |
| 32 | pub const CLOCK = linux.CLOCK; | 16 | pub const CLOCK = linux.CLOCK; |