fix: windows build

This commit is contained in:
CJ van den Berg 2026-04-15 12:46:53 +02:00
parent 3a321ecfe0
commit 469e26c0d8
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
4 changed files with 9 additions and 0 deletions

View file

@ -13,6 +13,7 @@ const cppflags = [_][]const u8{
"-Wno-deprecated-declarations", "-Wno-deprecated-declarations",
"-Wno-unqualified-std-cast-call", "-Wno-unqualified-std-cast-call",
"-Wno-bitwise-instead-of-logical", //for notcurses "-Wno-bitwise-instead-of-logical", //for notcurses
"-Wno-unused-command-line-argument", //zig passes -fno-rtlib-defaultlib when cross-compiling to windows
"-fno-sanitize=undefined", "-fno-sanitize=undefined",
"-gen-cdb-fragment-path", "-gen-cdb-fragment-path",
".cache/cdb", ".cache/cdb",

View file

@ -12,9 +12,11 @@ void install_remote_debugger();
void install_backtrace(); void install_backtrace();
void install_jitdebugger(); void install_jitdebugger();
#if !defined(_WIN32)
void sighdl_debugger(int no, siginfo_t * /*sigi*/, void * /*uco*/); void sighdl_debugger(int no, siginfo_t * /*sigi*/, void * /*uco*/);
void sighdl_remote_debugger(int no, siginfo_t * /*sigi*/, void * /*uco*/); void sighdl_remote_debugger(int no, siginfo_t * /*sigi*/, void * /*uco*/);
void sighdl_backtrace(int no, siginfo_t * /*sigi*/, void * /*uco*/); void sighdl_backtrace(int no, siginfo_t * /*sigi*/, void * /*uco*/);
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -6,7 +6,11 @@ extern "C" {
#endif #endif
#include <inttypes.h> #include <inttypes.h>
#if defined(_WIN32)
#include <ws2tcpip.h>
#else
#include <netinet/in.h> #include <netinet/in.h>
#endif
#include <stdint.h> #include <stdint.h>
struct thespian_tcp_acceptor_handle; struct thespian_tcp_acceptor_handle;

View file

@ -7,7 +7,9 @@
#include <thespian/c/socket.h> #include <thespian/c/socket.h>
#include <thespian/c/tcp.h> #include <thespian/c/tcp.h>
#ifndef _WIN32
#include <netinet/in.h> #include <netinet/in.h>
#endif
#include <string.h> #include <string.h>
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------