Skip to content

Commit 0101d35

Browse files
committed
Add RTLD_NEXT and RTLD_DEFAULT to native config (only run on macOS)
1 parent 0a2f73a commit 0101d35

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/main/java/org/truffleruby/platform/darwin/DarwinNativeConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,8 @@ public static void load(NativeConfiguration configuration, RubyContext context)
601601
configuration.config("platform.dlopen.RTLD_NOW", 2);
602602
configuration.config("platform.dlopen.RTLD_LOCAL", 4);
603603
configuration.config("platform.dlopen.RTLD_GLOBAL", 8);
604+
configuration.config("platform.dlopen.RTLD_NEXT", -1);
605+
configuration.config("platform.dlopen.RTLD_DEFAULT", -2);
604606
configuration.config("platform.clocks.CLOCK_MONOTONIC", 6);
605607
configuration.config("platform.clocks.CLOCK_MONOTONIC_RAW", 4);
606608
configuration.config("platform.clocks.CLOCK_MONOTONIC_RAW_APPROX", 5);

tool/generate-native-config.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ def constants(name)
769769

770770
constants 'dlopen' do |cg|
771771
cg.include 'dlfcn.h'
772-
cg.consts %w[RTLD_LAZY RTLD_NOW RTLD_LOCAL RTLD_GLOBAL]
772+
cg.consts %w[RTLD_LAZY RTLD_NOW RTLD_LOCAL RTLD_GLOBAL RTLD_NEXT RTLD_DEFAULT]
773773
end
774774

775775
constants 'clocks' do |cg|

0 commit comments

Comments
 (0)