Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
Merge pull request #860 from AriaXLi/PA-6549
Browse files Browse the repository at this point in the history
(PA-6549) Fix warning:undefining the allocator of T_DATA class
  • Loading branch information
joshcooper authored Jun 12, 2024
2 parents 2f23346 + 1b6bc80 commit db00b4c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions configs/components/_base-ruby-selinux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#

pkg.add_source("file://resources/patches/ruby-selinux/selinuxswig_ruby_wrap.patch")
pkg.add_source("file://resources/patches/ruby-selinux/selinuxswig_ruby_undefining_allocator.patch")

# These can be overridden by the including component.
ruby_version ||= settings[:ruby_version]
Expand Down Expand Up @@ -81,6 +82,7 @@
unless platform.name =~ /^(debian-12|ubuntu-24|fedora-40)/
steps << "#{platform.patch} --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../selinuxswig_ruby_wrap.patch"
end
steps << "#{platform.patch} --strip=0 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../selinuxswig_ruby_undefining_allocator.patch"
end

# libselinux 3.3 is the minimum version we want to build on RHEL 9, but the
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- selinuxswig_ruby_wrap.c.orig 2024-06-11 20:02:30.112707265 +0000
+++ selinuxswig_ruby_wrap.c 2024-06-11 22:34:16.000151780 +0000
@@ -1510,7 +1510,7 @@
_cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
}
- rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
+ rb_undef_alloc_func(rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer));
free((void *) klass_name);
}

0 comments on commit db00b4c

Please sign in to comment.