2013-09-26 17:14:40 +02:00

26 lines
703 B
Plaintext

$NetBSD: patch-bf,v 1.1 2013/06/17 12:43:28 wiz 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;