From 300badc96ab7a8b5b0a7ba515d82434ca5f90602 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 6 Jul 2023 02:04:47 +0900 Subject: [PATCH] Fix a couple of windows build issues There's still the problem with unused variables when building for windows because of vulkan debug stuff, but this fixes the important errors. It actually still works (at least under wine). --- libs/video/renderer/vulkan/vulkan_lighting.c | 2 +- qw/source/master.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/video/renderer/vulkan/vulkan_lighting.c b/libs/video/renderer/vulkan/vulkan_lighting.c index 1d8c506aa..e3419dc6b 100644 --- a/libs/video/renderer/vulkan/vulkan_lighting.c +++ b/libs/video/renderer/vulkan/vulkan_lighting.c @@ -590,7 +590,7 @@ Vulkan_Lighting_Setup (vulkan_ctx_t *ctx) }; } - QFV_CreateResource (ctx->device, lctx->light_resources); + QFV_CreateResource (device, lctx->light_resources); lctx->splat_verts = splat_verts[0].buffer.buffer; lctx->splat_inds = splat_inds[0].buffer.buffer; diff --git a/qw/source/master.c b/qw/source/master.c index f682f4467..8641e3d56 100644 --- a/qw/source/master.c +++ b/qw/source/master.c @@ -62,6 +62,7 @@ #include #include +#include #include #include #include @@ -70,6 +71,11 @@ #include "qw/protocol.h" +#ifdef _WIN32 +typedef uint32_t in_addr_t; +typedef uint16_t in_port_t; +#endif + #ifdef HAVE_IN_PKTINFO # ifndef SOL_IP // BSD-based stacks don't define this. # define SOL_IP IPPROTO_IP