Skip to content

Commit

Permalink
wslay: Harmonize thirdparty patching
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga committed Jan 31, 2025
1 parent 5893063 commit e11ee8e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
6 changes: 4 additions & 2 deletions thirdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 16 additions & 0 deletions thirdparty/wslay/patches/0001-msvc-build-fix.patch
Original file line number Diff line number Diff line change
@@ -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 <stdlib.h>
#include <sys/types.h>

+#if defined(_MSC_VER)
+#include <BaseTsd.h>
+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
18 changes: 0 additions & 18 deletions thirdparty/wslay/patches/msvcfix.diff

This file was deleted.

2 changes: 0 additions & 2 deletions thirdparty/wslay/wslay/wslay.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ extern "C" {
#include <stdlib.h>
#include <sys/types.h>

/* GODOT ADDITTION */
#if defined(_MSC_VER)
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif
/* GODOT END */

/*
* wslay/wslayver.h is generated from wslay/wslayver.h.in by
Expand Down

0 comments on commit e11ee8e

Please sign in to comment.