From a773a4eef6fb561e714dd68f013ba258bc3e81f6 Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Fri, 29 Jan 2016 20:04:01 +0100 Subject: [PATCH] Add OSX libdyld interop functions --- SharpPhysFS/Interop.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SharpPhysFS/Interop.cs b/SharpPhysFS/Interop.cs index b5eff57..b6cfe42 100644 --- a/SharpPhysFS/Interop.cs +++ b/SharpPhysFS/Interop.cs @@ -85,6 +85,17 @@ namespace SharpPhysFS [DllImport("libdl.so", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dlclose")] public static extern bool unix_dlclose(IntPtr handle); #endregion + + #region OSX + [DllImport("libdyld.dylib", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dlopen")] + public static extern IntPtr osx_dlopen(string filename, int flags); + + [DllImport("libdyld.dylib", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dlsym")] + public static extern IntPtr osx_dlsym(IntPtr handle, string symbol); + + [DllImport("libdyld.dylib", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dlclose")] + public static extern bool osx_dlclose(IntPtr handle); + #endregion } static class Interop