fix: don't try to export posix symbols on windows

This commit is contained in:
CJ van den Berg 2025-07-14 18:29:08 +02:00
parent 5398462364
commit ccdcbbff09
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -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;