diff --git a/src/thespian.zig b/src/thespian.zig index 825f97b..9d2b9f4 100644 --- a/src/thespian.zig +++ b/src/thespian.zig @@ -6,8 +6,10 @@ const c = @cImport({ @cInclude("thespian/c/metronome.h"); @cInclude("thespian/c/timeout.h"); @cInclude("thespian/c/signal.h"); - @cInclude("thespian/backtrace.h"); }); +const c_posix = if (builtin.os.tag != .windows) @cImport({ + @cInclude("thespian/backtrace.h"); +}) else {}; const cbor = @import("cbor"); const builtin = @import("builtin"); @@ -22,9 +24,9 @@ pub const install_remote_debugger = c.install_remote_debugger; pub const install_backtrace = c.install_backtrace; pub const install_jitdebugger = c.install_jitdebugger; -pub const sighdl_debugger = c.sighdl_debugger; -pub const sighdl_remote_debugger = c.sighdl_remote_debugger; -pub const sighdl_backtrace = c.sighdl_backtrace; +pub const sighdl_debugger = if (builtin.os.tag != .windows) c_posix.sighdl_debugger else {}; +pub const sighdl_remote_debugger = if (builtin.os.tag != .windows) c_posix.sighdl_remote_debugger else {}; +pub const sighdl_backtrace = if (builtin.os.tag != .windows) c_posix.sighdl_backtrace else {}; pub const max_message_size = 8 * 4096; const message_buf_allocator = std.heap.c_allocator;