Commit e5f6637e authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

Make us work on FreeBSD again by working around their different mmap()

implementation.
parent 64b4d5a4
...@@ -44,10 +44,8 @@ Linux info: ...@@ -44,10 +44,8 @@ Linux info:
it's best to have a current kernel such as 2.4.x. it's best to have a current kernel such as 2.4.x.
FreeBSD info: FreeBSD info:
Wine should build on FreeBSD 4.x and FreeBSD 5.x before 5.3, but will Wine should build on FreeBSD 4.x and FreeBSD 5.x, but versions before
generally not work on these systems due to issues with threading and FreeBSD 5.3 will generally not work properly.
mmap(). In fact, even on FreeBSD 5.3 you will need the kernel patch
posted at <http://www.freebsd.org/cgi/query-pr.cgi?pr=73092>.
More information can be found in the FreeBSD ports tree at More information can be found in the FreeBSD ports tree at
<ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/emulators/wine/>. <ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/emulators/wine/>.
......
...@@ -174,6 +174,11 @@ void *wine_anon_mmap( void *start, size_t size, int prot, int flags ) ...@@ -174,6 +174,11 @@ void *wine_anon_mmap( void *start, size_t size, int prot, int flags )
if (!(flags & MAP_FIXED)) if (!(flags & MAP_FIXED))
{ {
#ifdef __FreeBSD__
/* Even FreeBSD 5.3 does not properly support NULL here. */
if( start == NULL ) start = (void *)0x110000;
#endif
#ifdef MAP_TRYFIXED #ifdef MAP_TRYFIXED
/* If available, this will attempt a fixed mapping in-kernel */ /* If available, this will attempt a fixed mapping in-kernel */
flags |= MAP_TRYFIXED; flags |= MAP_TRYFIXED;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment