diff options
author | NARUSE, Yui <naruse@airemix.jp> | 2023-01-25 13:26:25 +0900 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2023-01-25 13:26:25 +0900 |
commit | 4110137fcfd805de03a8f5569c3d6926959b9363 (patch) | |
tree | 0d59eee0a294c551ed160fc220c4b0e40680df1b /include | |
parent | 0090cb82b0bf477c29a659e34cf4427a3b1ceb27 (diff) |
merge revision(s) 6f3aff3961a4c5ce87e05096a1a9dcf1055b7647: [Backport #19289]
[Bug #19289] Retain `ruby_abi_version` function
A few extension libraries, to hide all symbols except for necessary to
load, hardcode the symbols to be exported in symbol list files for
linker without even checking by `have_func`. As a workaround for such
libraries, retain `ruby_abi_version` symbol always even in released
versions for now.
---
include/ruby/internal/abi.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/internal/abi.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/ruby/internal/abi.h b/include/ruby/internal/abi.h index d67aa0d509..44111a0055 100644 --- a/include/ruby/internal/abi.h +++ b/include/ruby/internal/abi.h @@ -31,6 +31,7 @@ #if defined(HAVE_FUNC_WEAK) && !defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) # define RUBY_DLN_CHECK_ABI #endif +#endif /* RUBY_ABI_VERSION */ #ifdef RUBY_DLN_CHECK_ABI @@ -41,7 +42,11 @@ extern "C" { RUBY_FUNC_EXPORTED unsigned long long __attribute__((weak)) ruby_abi_version(void) { +# ifdef RUBY_ABI_VERSION return RUBY_ABI_VERSION; +# else + return 0; +# endif } # ifdef __cplusplus @@ -51,5 +56,3 @@ ruby_abi_version(void) #endif #endif - -#endif |