commit 1a35979fc768eff6b6fca56a6d40f4354658cf11 parent 520371f9cc749b3f96faf14e52861e3d30c42405 Author: Marco Simonelli <msimonelli@protonmail.com> Date: Fri, 10 Mar 2023 11:51:15 +0000 BB 41459: WebRTC fails to build under mingw (Part 3) - fixes required to build third_party/sipcc Diffstat:
| M | third_party/sipcc/cpr_win_types.h | | | 13 | ++++++++++--- |
| M | third_party/sipcc/sdp_token.c | | | 4 | ++++ |
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/third_party/sipcc/cpr_win_types.h b/third_party/sipcc/cpr_win_types.h @@ -40,15 +40,22 @@ typedef uint8_t boolean; * NOTE: size_t should already be declared by both the MinGW and Microsoft * SDKs. */ -#ifndef _SSIZE_T_ + +#if defined(_MSC_VER) && !defined(_SSIZE_T_) #define _SSIZE_T_ -typedef int ssize_t; +#if !defined(_WIN64) +typedef int32_t ssize_t; +#else +typedef int64_t ssize_t; +#endif #endif /* - * Define pid_t. + * Define pid_t for MSVC builds */ +#if defined(_WIN32) && defined (_MSC_VER) typedef int pid_t; +#endif /* * Define min/max diff --git a/third_party/sipcc/sdp_token.c b/third_party/sipcc/sdp_token.c @@ -4,6 +4,10 @@ #include <errno.h> +#if defined(SIP_OS_WINDOWS) && !defined(_MSC_VER) +#include <minmax.h> +#endif + #include "sdp_os_defs.h" #include "sipcc_sdp.h" #include "sdp_private.h"