summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-26 19:17:47 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-26 19:17:47 +0900
commit5917fe2303bc85882b52e60145eb031ee18583c7 (patch)
tree5e3a79c302bc63f5cfe76e912c5d8210341743dd /ext
parent17d17de0e8891bba2ab509714fc52764eaeafd65 (diff)
_GNU_SOURCE is needed for mkostemp on Cygwin
Diffstat (limited to 'ext')
-rw-r--r--ext/fiddle/extlibs1
-rw-r--r--ext/fiddle/win32/libffi-3.2.1-cygwin.patch11
2 files changed, 12 insertions, 0 deletions
diff --git a/ext/fiddle/extlibs b/ext/fiddle/extlibs
index 030621f407..85490ea03b 100644
--- a/ext/fiddle/extlibs
+++ b/ext/fiddle/extlibs
@@ -6,6 +6,7 @@ https://ftp.osuosl.org/pub/blfs/conglomeration/libffi/$(pkg).tar.gz \
sha512:980ca30a8d76f963fca722432b1fe5af77d7a4e4d2eac5144fbc5374d4c596609a293440573f4294207e1bdd9fda80ad1e1cafb2ffb543df5a275bc3bd546483 \
#
win32/$(pkg)-mswin.patch -p0
+ win32/$(pkg)-cygwin.patch -p0
$(pkg)/config.guess -> /tool/config.guess
$(pkg)/config.sub -> /tool/config.sub
diff --git a/ext/fiddle/win32/libffi-3.2.1-cygwin.patch b/ext/fiddle/win32/libffi-3.2.1-cygwin.patch
new file mode 100644
index 0000000000..743be274f4
--- /dev/null
+++ b/ext/fiddle/win32/libffi-3.2.1-cygwin.patch
@@ -0,0 +1,11 @@
+--- libffi-3.2.1/src/closures.c 2014-11-08 21:47:24.000000000 +0900
++++ libffi-3.2.1/src/closures.c 2020-05-26 19:09:26.334088215 +0900
+@@ -26,7 +26,7 @@
+ DEALINGS IN THE SOFTWARE.
+ ----------------------------------------------------------------------- */
+
+-#if defined __linux__ && !defined _GNU_SOURCE
++#if (defined __linux__ || defined __CYGWIN__) && !defined _GNU_SOURCE
+ #define _GNU_SOURCE 1
+ #endif
+