diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1e3088c6b..603239ac4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -503,6 +503,7 @@ target_compile_options(SRB2SDL2 PRIVATE $<$,$,$>>: -Wall -Wextra + -Wno-error=date-time -Wno-absolute-value -Wno-trigraphs -Wno-error=non-literal-null-conversion @@ -515,6 +516,7 @@ target_compile_options(SRB2SDL2 PRIVATE # C++, GNU, Clang and Apple Clang $<$,$,$,$>>: -Wall + -Wno-error=date-time -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-private-field diff --git a/src/acs/ACSVM/ACSVM/String.hpp b/src/acs/ACSVM/ACSVM/String.hpp index 7c46e4f92..363addd4b 100644 --- a/src/acs/ACSVM/ACSVM/String.hpp +++ b/src/acs/ACSVM/ACSVM/String.hpp @@ -19,6 +19,7 @@ #include #include #include +#include //----------------------------------------------------------------------------| diff --git a/src/cxxutil.hpp b/src/cxxutil.hpp index b8b211bf1..4ee931da6 100644 --- a/src/cxxutil.hpp +++ b/src/cxxutil.hpp @@ -2,6 +2,7 @@ #define __SRB2_CXXUTIL_HPP__ #include +#include #include #include diff --git a/src/d_net.c b/src/d_net.c index 5ec023ef4..45b449467 100644 --- a/src/d_net.c +++ b/src/d_net.c @@ -1083,7 +1083,8 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen else netbuffer->ack = acknum; - netbuffer->packetindex = nodes[doomcom->remotenode].sendnum++; + if (node < MAXNETNODES) + netbuffer->packetindex = nodes[doomcom->remotenode].sendnum++; netbuffer->checksum = NetbufferChecksum(); sendbytes += packetheaderlength + doomcom->datalength; // For stat diff --git a/thirdparty/tcbrindle_span/include/tcb/span.hpp b/thirdparty/tcbrindle_span/include/tcb/span.hpp index fdc3a988a..63ad0b43d 100644 --- a/thirdparty/tcbrindle_span/include/tcb/span.hpp +++ b/thirdparty/tcbrindle_span/include/tcb/span.hpp @@ -16,6 +16,7 @@ http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/n4820.pdf #include #include #include +#include #ifndef TCB_SPAN_NO_EXCEPTIONS // Attempt to discover whether we're being compiled with exception support diff --git a/toolchain/LinuxZig.cmake b/toolchain/LinuxZig.cmake new file mode 100644 index 000000000..28de1b493 --- /dev/null +++ b/toolchain/LinuxZig.cmake @@ -0,0 +1,8 @@ +# which compilers to use for C and C++ +set(CMAKE_C_COMPILER zig cc) +set(CMAKE_CXX_COMPILER zig c++) +set(CMAKE_C_COMPILER_TARGET ${TARGET}) +set(CMAKE_CXX_COMPILER_TARGET ${TARGET}) + +set(CMAKE_C_LINKER_DEPFILE_SUPPORTED FALSE) +set(CMAKE_CXX_LINKER_DEPFILE_SUPPORTED FALSE)