diff --git a/src/bindings/mono/eina_mono/eina_error.cs b/src/bindings/mono/eina_mono/eina_error.cs index 1300e796ab..004792fdb7 100644 --- a/src/bindings/mono/eina_mono/eina_error.cs +++ b/src/bindings/mono/eina_mono/eina_error.cs @@ -59,11 +59,27 @@ public struct Error : IComparable, IEquatable /// Since EFL 1.23. /// public static readonly Error ENOENT = new Error(2); + + /// + /// Return architecture independent ECANCELED error code. + /// Returns 125 for Linux, 89 for OSX and 105 for Windows. + /// Since EFL 1.25. + /// + private static int IndependentECANCELED() + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + return new Error(125); + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + return new Error(89); + else // Windows + return new Error(105); + } + /// /// Cancelled error identifier. /// Since EFL 1.23. /// - public static readonly Error ECANCELED = new Error(125); + public static readonly Error ECANCELED = IndependentECANCELED(); /// /// Constructor.