summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ruby/internal/abi.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/ruby/internal/abi.h b/include/ruby/internal/abi.h
index b5ce9dc289..8e1bbf3951 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