Please sign in to comment.
[MonoPosixHelper] Allow MmapFlags.MAP_ANON use on OS X.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=3419 The problem is that OS X defines MAP_ANON but not MAP_ANONYMOUS, AND MAP_ANON and MAP_ANONYMOUS have the same value. Furthermore, create-native-map doesn't have any special support for constants with the same value, so it emits the validation independently. The result is that the following fails on OS X: $ csharp -r:Mono.Posix.dll csharp> int r; csharp> using Mono.Unix.Native; csharp> NativeConvert.TryFromMmapFlags(MmapFlags.MAP_ANONYMOUS, out r); false csharp> r; The (hackish) fix is to provide MAP_ANONYMOUS on OS X, thus allowing the existing validation logic to work as expected.
- Loading branch information...