summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-03-01 09:44:39 -0500
committerPeter Zhu <peter@peterzhu.ca>2022-03-01 09:44:39 -0500
commit25ad9eabc7e49de61b1c0504c14c5af46bf446ed (patch)
treefddb7f0c146b07500d710aa8e8348011db0aee8a /include
parent210f29a6bfde91beba1773e848843e43554745aa (diff)
Only define RUBY_DLN_CHECK_ABI when supported
Diffstat (limited to 'include')
-rw-r--r--include/ruby/internal/abi.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/ruby/internal/abi.h b/include/ruby/internal/abi.h
index 78ed4c1875..81899dcd31 100644
--- a/include/ruby/internal/abi.h
+++ b/include/ruby/internal/abi.h
@@ -27,12 +27,10 @@
/* Windows does not support weak symbols so ruby_abi_version will not exist
* in the shared library. */
#if defined(HAVE_FUNC_WEAK) && !defined(_WIN32) && !defined(__MINGW32__)
-# define RUBY_DLN_CHECK_ABI 1
-#else
-# define RUBY_DLN_CHECK_ABI 0
+# define RUBY_DLN_CHECK_ABI
#endif
-#if RUBY_DLN_CHECK_ABI
+#ifdef RUBY_DLN_CHECK_ABI
RUBY_FUNC_EXPORTED unsigned long long __attribute__((weak))
ruby_abi_version(void)