Skip to content

Commit

Permalink
Do not define ABI version in statically linked objects
Browse files Browse the repository at this point in the history
It is for dynamically loading, useless for statically linked objects.
  • Loading branch information
nobu committed Feb 4, 2024
1 parent 8b897e6 commit 7b3e05c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dln.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ dln_load(const char *file)
typedef unsigned long long abi_version_number;
abi_version_number binary_abi_version =
dln_sym_callable(abi_version_number, (void), handle, EXTERNAL_PREFIX "ruby_abi_version")();
if (binary_abi_version != ruby_abi_version() && abi_check_enabled_p()) {
if (binary_abi_version != RUBY_ABI_VERSION && abi_check_enabled_p()) {
dln_loaderror("incompatible ABI version of binary - %s", file);
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion include/ruby/internal/abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#endif
#endif /* RUBY_ABI_VERSION */

#ifdef RUBY_DLN_CHECK_ABI
#if defined(RUBY_DLN_CHECK_ABI) && !defined(RUBY_EXPORT)

# ifdef __cplusplus
extern "C" {
Expand Down

0 comments on commit 7b3e05c

Please sign in to comment.