[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.

7dcb40bccb
This commit is contained in:
Nobuyoshi Nakada 2024-10-23 06:07:16 +09:00 committed by Hiroshi SHIBATA
parent 346085ea94
commit a51007fc35
2 changed files with 1 additions and 5 deletions

View file

@ -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

View file

@ -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