Imported Upstream version 4.8.0.309

Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-10 13:04:39 +00:00
parent ee1447783b
commit 94b2861243
4912 changed files with 390737 additions and 49310 deletions

View File

@@ -22,6 +22,11 @@
#define __BSD_VISIBLE 1
#endif
#ifdef __NetBSD__
/* For mincore () */
#define _NETBSD_SOURCE
#endif
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
@@ -109,8 +114,15 @@ Mono_Posix_Syscall_mremap (void *old_address, mph_size_t old_size,
if (Mono_Posix_FromMremapFlags (flags, &_flags) == -1)
return MAP_FAILED;
#if defined(linux)
return mremap (old_address, (size_t) old_size, (size_t) new_size,
(unsigned long) _flags);
#elif defined(__NetBSD__)
return mremap (old_address, (size_t) old_size, old_address,
(size_t) new_size, (unsigned long) _flags);
#else
#error Port me
#endif
}
#endif /* def HAVE_MREMAP */