summaryrefslogtreecommitdiffstats
path: root/lib/kross/ruby/rubywrapper.c
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2022-03-21 12:23:32 +0100
committerSlávek Banko <slavek.banko@axis.cz>2022-03-21 12:23:32 +0100
commit920d54124a7ed87e205b280038934d9c3a55cee1 (patch)
tree1fb31204d00830f134888aa263a4d71e7279060e /lib/kross/ruby/rubywrapper.c
parent07ad9d5a17eb91bd3d14f3289474aa83888c869e (diff)
downloadkoffice-920d54124a7ed87e205b280038934d9c3a55cee1.tar.gz
koffice-920d54124a7ed87e205b280038934d9c3a55cee1.zip
Fix FTBFS with Ruby 3.x due to removed rb_set_safe_level.
In Ruby 2.7 the entire concept is deprecated and in Ruby 3.x is removed entirely - see https://bugs.ruby-lang.org/issues/16131 Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'lib/kross/ruby/rubywrapper.c')
-rw-r--r--lib/kross/ruby/rubywrapper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/kross/ruby/rubywrapper.c b/lib/kross/ruby/rubywrapper.c
index 84d12540a..a25b1b282 100644
--- a/lib/kross/ruby/rubywrapper.c
+++ b/lib/kross/ruby/rubywrapper.c
@@ -17,8 +17,11 @@
* Boston, MA 02110-1301, USA.
***************************************************************************/
+#include "config.h"
#include "ruby.h"
void kross_rb_set_safe_level(int safelevel) {
+#ifndef HAVE_RUBY_3
rb_set_safe_level(safelevel);
+#endif
}