From 9233edd344e20aa4d856687f4ee368ea69a95b6b Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Wed, 3 Jul 2019 10:52:26 +0200 Subject: [PATCH] Godot addition to wslay, fixes MSVC build --- thirdparty/README.md | 5 +++++ thirdparty/wslay/includes/wslay/wslay.h | 6 ++++++ thirdparty/wslay/msvcfix.diff | 17 +++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 thirdparty/wslay/msvcfix.diff diff --git a/thirdparty/README.md b/thirdparty/README.md index ebfa5b3b836..dbdf9bbf4fe 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -268,6 +268,11 @@ changes are marked with `// -- GODOT --` comments. - Version: 1.1.0 - License: MIT +File extracted from upstream releaze tarball: + +- All `*.c` and `*.h` in `lib/` and `lib/includes/` +- `wslay.h` has a small Godot addition to fix MSVC build. + See `thirdparty/wslay/msvcfix.diff` ## mbedtls diff --git a/thirdparty/wslay/includes/wslay/wslay.h b/thirdparty/wslay/includes/wslay/wslay.h index 2fde81a4e9d..9c751b05b76 100644 --- a/thirdparty/wslay/includes/wslay/wslay.h +++ b/thirdparty/wslay/includes/wslay/wslay.h @@ -33,6 +33,12 @@ extern "C" { #include #include +/* GODOT ADDITTION */ +#if defined(_MSC_VER) +#include +typedef SSIZE_T ssize_t; +#endif +/* GODOT END */ /* * wslay/wslayver.h is generated from wslay/wslayver.h.in by diff --git a/thirdparty/wslay/msvcfix.diff b/thirdparty/wslay/msvcfix.diff new file mode 100644 index 00000000000..28721844f4a --- /dev/null +++ b/thirdparty/wslay/msvcfix.diff @@ -0,0 +1,17 @@ +diff --git a/thirdparty/wslay/includes/wslay/wslay.h b/thirdparty/wslay/includes/wslay/wslay.h +index 2fde81a4e..9c751b05b 100644 +--- a/thirdparty/wslay/includes/wslay/wslay.h ++++ b/thirdparty/wslay/includes/wslay/wslay.h +@@ -33,6 +33,12 @@ extern "C" { + #include + #include + ++/* GODOT ADDITTION */ ++#if defined(_MSC_VER) ++#include ++typedef SSIZE_T ssize_t; ++#endif ++/* GODOT END */ + + /* + * wslay/wslayver.h is generated from wslay/wslayver.h.in by