Browse Source

fix not using RTLD_LOCAL on darwin

Laytan Laats 8 months ago
parent
commit
80d09774b4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      core/dynlib/lib_unix.odin

+ 2 - 0
core/dynlib/lib_unix.odin

@@ -13,6 +13,8 @@ _load_library :: proc(path: string, global_symbols: bool, allocator: runtime.All
 	flags := posix.RTLD_Flags{.NOW}
 	flags := posix.RTLD_Flags{.NOW}
 	if global_symbols {
 	if global_symbols {
 		flags += {.GLOBAL}
 		flags += {.GLOBAL}
+	} else {
+		flags += posix.RTLD_LOCAL
 	}
 	}
 
 
 	cpath := strings.clone_to_cstring(path, allocator)
 	cpath := strings.clone_to_cstring(path, allocator)