From e11ee8eb369652ff2dd0938455b14ea91e5c6fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 31 Jan 2025 18:08:22 +0100 Subject: [PATCH] wslay: Harmonize thirdparty patching --- thirdparty/README.md | 6 ++++-- .../wslay/patches/0001-msvc-build-fix.patch | 16 ++++++++++++++++ thirdparty/wslay/patches/msvcfix.diff | 18 ------------------ thirdparty/wslay/wslay/wslay.h | 2 -- 4 files changed, 20 insertions(+), 22 deletions(-) create mode 100644 thirdparty/wslay/patches/0001-msvc-build-fix.patch delete mode 100644 thirdparty/wslay/patches/msvcfix.diff diff --git a/thirdparty/README.md b/thirdparty/README.md index 6f9676779b05..3ce55dc1a9a5 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -1122,10 +1122,12 @@ File extracted from upstream release tarball: Contents might need tweaking for Godot, review diff - All `.c` and `.h` files from `lib/` - All `.h` in `lib/includes/wslay/` as `wslay/` -- `wslay/wslay.h` has a small Godot addition to fix MSVC build - See `patches/msvcfix.diff` - `COPYING` +Patches: + +- `0001-msvc-build-fix.patch` (GH-30263) + ## xatlas diff --git a/thirdparty/wslay/patches/0001-msvc-build-fix.patch b/thirdparty/wslay/patches/0001-msvc-build-fix.patch new file mode 100644 index 000000000000..dab365bba62c --- /dev/null +++ b/thirdparty/wslay/patches/0001-msvc-build-fix.patch @@ -0,0 +1,16 @@ +diff --git a/thirdparty/wslay/wslay/wslay.h b/thirdparty/wslay/wslay/wslay.h +index 7ab850111a..7d63bdb2ce 100644 +--- a/thirdparty/wslay/wslay/wslay.h ++++ b/thirdparty/wslay/wslay/wslay.h +@@ -33,6 +33,11 @@ extern "C" { + #include + #include + ++#if defined(_MSC_VER) ++#include ++typedef SSIZE_T ssize_t; ++#endif ++ + /* + * wslay/wslayver.h is generated from wslay/wslayver.h.in by + * configure. The projects which do not use autotools can set diff --git a/thirdparty/wslay/patches/msvcfix.diff b/thirdparty/wslay/patches/msvcfix.diff deleted file mode 100644 index f58b6d44f07a..000000000000 --- a/thirdparty/wslay/patches/msvcfix.diff +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/thirdparty/wslay/includes/wslay/wslay.h b/thirdparty/wslay/includes/wslay/wslay.h -index 77a4e8253f..ac6873613f 100644 ---- a/thirdparty/wslay/includes/wslay/wslay.h -+++ b/thirdparty/wslay/includes/wslay/wslay.h -@@ -33,6 +33,13 @@ 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 - * configure. The projects which do not use autotools can set diff --git a/thirdparty/wslay/wslay/wslay.h b/thirdparty/wslay/wslay/wslay.h index b7fe516ba3b2..7d63bdb2ce0e 100644 --- a/thirdparty/wslay/wslay/wslay.h +++ b/thirdparty/wslay/wslay/wslay.h @@ -33,12 +33,10 @@ 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