From f7c11a94e922ad8772ec382ed36efbf73b79d33e Mon Sep 17 00:00:00 2001 From: ts-korhonen Date: Tue, 18 Oct 2022 20:44:09 +0300 Subject: [PATCH] Fix windows clang+vcpkg build. --- src/cdrom/cdrom_image_backend.c | 1 + src/cdrom/cdrom_image_viso.c | 4 ++++ src/include/86box/plat.h | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/src/cdrom/cdrom_image_backend.c b/src/cdrom/cdrom_image_backend.c index 1c5a87821..582f9d1d6 100644 --- a/src/cdrom/cdrom_image_backend.c +++ b/src/cdrom/cdrom_image_backend.c @@ -27,6 +27,7 @@ #include #ifdef _WIN32 # include +# include #else # include #endif diff --git a/src/cdrom/cdrom_image_viso.c b/src/cdrom/cdrom_image_viso.c index e529bdb96..7d40deb26 100644 --- a/src/cdrom/cdrom_image_viso.c +++ b/src/cdrom/cdrom_image_viso.c @@ -38,6 +38,10 @@ #include <86box/nvr.h> // clang-format on +#ifndef S_ISDIR +# define S_ISDIR(m) (((m) &S_IFMT) == S_IFDIR) +#endif + #define VISO_SKIP(p, n) \ { \ memset(p, 0x00, n); \ diff --git a/src/include/86box/plat.h b/src/include/86box/plat.h index 1c17d50bd..aa01ac129 100644 --- a/src/include/86box/plat.h +++ b/src/include/86box/plat.h @@ -76,6 +76,10 @@ extern "C" { # define atomic_bool_t atomic_bool #endif +#if defined(_MSC_VER) +# define ssize_t intptr_t +#endif + /* Global variables residing in the platform module. */ extern int dopause, /* system is paused */ mouse_capture; /* mouse is captured in app */