libwine: Use try_mmap_fixed for wine64 on FreeBSD
André Hentschel
nerv at dawncrow.de
Tue Sep 10 14:16:24 CDT 2013
This is the only change needed to run wine on FreeBSD/amd64
http://bugs.winehq.org/show_bug.cgi?id=34330
it has no effect on the 32-bit FreeBSD derivates, therefor the check for 64-bit
---
libs/wine/mmap.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libs/wine/mmap.c b/libs/wine/mmap.c
index b219147..36bf1b1 100644
--- a/libs/wine/mmap.c
+++ b/libs/wine/mmap.c
@@ -82,7 +82,8 @@ static inline int get_fdzero(void)
return fd;
}
-#if (defined(__svr4__) || defined(__NetBSD__)) && !defined(MAP_TRYFIXED)
+#if (defined(__svr4__) || defined(__NetBSD__) || (defined(__FreeBSD__) && defined(__x86_64__))) && \
+ !defined(MAP_TRYFIXED)
/***********************************************************************
* try_mmap_fixed
*
@@ -213,7 +214,8 @@ void *wine_anon_mmap( void *start, size_t size, int prot, int flags )
#ifdef MAP_TRYFIXED
/* If available, this will attempt a fixed mapping in-kernel */
flags |= MAP_TRYFIXED;
-#elif defined(__svr4__) || defined(__NetBSD__) || defined(__APPLE__)
+#elif defined(__svr4__) || defined(__NetBSD__) || defined(__APPLE__) || \
+ (defined(__FreeBSD__) && defined(__x86_64__))
if ( try_mmap_fixed( start, size, prot, flags, get_fdzero(), 0 ) )
return start;
#endif
--
1.8.1.2
More information about the wine-patches
mailing list