summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-10-23 06:07:16 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2024-10-26 18:44:15 +0900
commita51007fc35da3b5cc6312e335d38ee7a37215bcc (patch)
treec58febdb99be0c9f8abf805ff9c8f0bd8f5fffa7
parent346085ea940b604ea7b643d7a0acd9e890c926d9 (diff)
[ruby/fiddle] Suppress -Wundef warnings
(https://github.com/ruby/fiddle/pull/157) The GCC warning puts undefined macro names in double quotes while clang puts them in single quotes. https://github.com/ruby/fiddle/commit/7dcb40bccb
-rw-r--r--ext/fiddle/extconf.rb5
-rw-r--r--ext/fiddle/fiddle.h1
2 files changed, 1 insertions, 5 deletions
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index 2899980657..63eacf2c81 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -68,11 +68,6 @@ unless bundle
end
if have_ffi_header && (have_library('ffi') || have_library('libffi'))
have_libffi = true
- checking_for("undefined FFI_GO_CLOSURES is used") do
- if egrep_cpp(/warning: 'FFI_GO_CLOSURES' is not defined/, cpp_include(ffi_header), "2>&1")
- $defs.push('-DFFI_GO_CLOSURES=0')
- end
- end
end
end
diff --git a/ext/fiddle/fiddle.h b/ext/fiddle/fiddle.h
index c0ab8a91ec..49cc602367 100644
--- a/ext/fiddle/fiddle.h
+++ b/ext/fiddle/fiddle.h
@@ -40,6 +40,7 @@
# endif
#endif
+#define FFI_GO_CLOSURES 0 /* fiddle does not use go closures */
#ifdef USE_HEADER_HACKS
#include <ffi/ffi.h>
#else