 //===----------------------------------------------------------------------===//
 // The `PythonLibrary` struct that loads Python symbols at runtime.
 //===----------------------------------------------------------------------===//
+
+#if canImport(Darwin)
+let RTLD_DEFAULT = UnsafeMutableRawPointer(bitPattern: -2)
+#else
+let RTLD_DEFAULT: UnsafeMutableRawPointer? = nil
+#endif
 
 public struct PythonLibrary {
     private static let shared = PythonLibrary()

    static var libraryVersionSeparator = ""
    #endif
    
    static let libraryPaths: [String] = {
        var libraryPaths: [String] = []
        for librarySearchPath in librarySearchPaths {

        }
        return libraryPaths
    }()
        
    static func loadPythonLibrary() -> UnsafeMutableRawPointer? {
        if self.isPythonLibraryPreloaded {
            return RTLD_DEFAULT
        }
        else if let pythonLibraryPath = Environment.library.value {
            return self.loadPythonLibrary(at: pythonLibraryPath)
