25 lines
706 B
Text
25 lines
706 B
Text
$NetBSD: patch-bf,v 1.2 2008/02/13 14:16:43 kefren Exp $
|
|
--- support/map.c.orig 2008-02-05 14:14:43.000000000 +0200
|
|
+++ support/map.c 2008-02-05 14:16:06.000000000 +0200
|
|
@@ -3011,13 +3011,21 @@ int Mono_Posix_ToMountFlags (guint64 x,
|
|
|
|
int Mono_Posix_FromMremapFlags (guint64 x, guint64 *r)
|
|
{
|
|
+#ifdef __NetBSD__
|
|
+ *r = MAP_FIXED;
|
|
+#else
|
|
*r = 0;
|
|
+#endif
|
|
if ((x & Mono_Posix_MremapFlags_MREMAP_MAYMOVE) == Mono_Posix_MremapFlags_MREMAP_MAYMOVE)
|
|
+#ifdef __NetBSD__
|
|
+ *r &= ~MAP_FIXED;
|
|
+#else
|
|
#ifdef MREMAP_MAYMOVE
|
|
*r |= MREMAP_MAYMOVE;
|
|
#else /* def MREMAP_MAYMOVE */
|
|
{errno = EINVAL; return -1;}
|
|
#endif /* ndef MREMAP_MAYMOVE */
|
|
+#endif /* __NetBSD__ */
|
|
if (x == 0)
|
|
return 0;
|
|
return 0;
|