2016-01-21 23:40:00 +01:00

37 lines
856 B
Plaintext

$NetBSD: patch-be,v 1.5 2014/11/30 08:40:51 spz Exp $
--- support/sys-mman.c.orig 2014-09-22 13:23:09.000000000 +0000
+++ support/sys-mman.c
@@ -10,7 +10,6 @@
#include <config.h>
#ifndef __OpenBSD__
-#define _XOPEN_SOURCE 600
#endif
#ifdef PLATFORM_MACOSX
@@ -25,6 +24,9 @@
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
+#ifdef __sun
+#include <unistd.h>
+#endif
#include "map.h"
#include "mph.h"
@@ -109,8 +111,13 @@ Mono_Posix_Syscall_mremap (void *old_add
if (Mono_Posix_FromMremapFlags (flags, &_flags) == -1)
return MAP_FAILED;
+#if defined(__NetBSD__)
+ return mremap (old_address, (size_t) old_size, old_address, (size_t) new_size,
+ (unsigned long) _flags);
+#else
return mremap (old_address, (size_t) old_size, (size_t) new_size,
(unsigned long) _flags);
+#endif
}
#endif /* def HAVE_MREMAP */