diff --git a/src/ObjCRuntime/Dlfcn.cs b/src/ObjCRuntime/Dlfcn.cs index 764c2e832770..578cd2ef03c1 100644 --- a/src/ObjCRuntime/Dlfcn.cs +++ b/src/ObjCRuntime/Dlfcn.cs @@ -211,6 +211,8 @@ public static ulong GetUInt64 (IntPtr handle, string symbol) return (ulong) Marshal.ReadInt64 (indirect); } +#if !XAMCORE_4_0 + [Obsolete ("Use 'SetInt64' for long values instead.")] public static void SetUInt64 (IntPtr handle, string symbol, long value) { var indirect = dlsym (handle, symbol); @@ -219,6 +221,16 @@ public static void SetUInt64 (IntPtr handle, string symbol, long value) Marshal.WriteInt64 (indirect, (long) value); } +#endif + + public static void SetUInt64 (IntPtr handle, string symbol, ulong value) + { + var indirect = dlsym (handle, symbol); + if (indirect == IntPtr.Zero) + return; + + Marshal.WriteInt64 (indirect, (long) value); + } public static void SetString (IntPtr handle, string symbol, string value) {