summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFrançois Andriot <[email protected]>2021-05-10 20:19:48 +0200
committerMichele Calgaro <[email protected]>2021-05-11 09:29:57 +0900
commitc1b01d3bff65c0c222ae4a399c212606e19d1366 (patch)
tree729a55de5a10ee305619b28f03c429c4837a1d66 /lib
parentc7d3db547e15ba9d1646cf4c9c4b4adfce5b2443 (diff)
downloadkoffice-c1b01d3bff65c0c222ae4a399c212606e19d1366.tar.gz
koffice-c1b01d3bff65c0c222ae4a399c212606e19d1366.zip
Fix build on Fedora 34 / Ruby 3.0.1
Signed-off-by: François Andriot <[email protected]> (cherry picked from commit e58be56584c7510639c55bb20f3000bd9b796284)
Diffstat (limited to 'lib')
-rw-r--r--lib/kross/configure.in.in3
-rw-r--r--lib/kross/ruby/rubyscript.cpp2
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/kross/configure.in.in b/lib/kross/configure.in.in
index ad95e626..c9acf48b 100644
--- a/lib/kross/configure.in.in
+++ b/lib/kross/configure.in.in
@@ -43,6 +43,9 @@ if test "x$compile_kross" = "xyes" ; then
if test "$RUBY_SERIES" -ge "19"; then
AC_DEFINE_UNQUOTED(HAVE_RUBY_1_9, 1, [Defines if your system has Ruby 1.9.x])
fi
+ if test "$RUBY_SERIES" -ge "30"; then
+ AC_DEFINE_UNQUOTED(HAVE_RUBY_3, 1, [Defines if your system has Ruby 3.x])
+ fi
if test `${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG.key?(%q(rubyhdrdir))"` = "true"; then
RUBY_INCLUDEDIR=`${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(rubyhdrdir))"`
diff --git a/lib/kross/ruby/rubyscript.cpp b/lib/kross/ruby/rubyscript.cpp
index 381785ff..889383cd 100644
--- a/lib/kross/ruby/rubyscript.cpp
+++ b/lib/kross/ruby/rubyscript.cpp
@@ -31,7 +31,9 @@
#include <rubysig.h>
#include <node.h>
#else // HAVE_RUBY_1_9
+#ifndef HAVE_RUBY_3
#include <ruby/backward/rubysig.h>
+#endif // HAVE_RUBY_3
#endif // HAVE_RUBY_1_9
#include <main/scriptcontainer.h>