diff --git a/README b/README index ab6a0bd0f59..342f80aab0d 100644 --- a/README +++ b/README @@ -44,10 +44,8 @@ Linux info: it's best to have a current kernel such as 2.4.x. FreeBSD info: - Wine should build on FreeBSD 4.x and FreeBSD 5.x before 5.3, but will - generally not work on these systems due to issues with threading and - mmap(). In fact, even on FreeBSD 5.3 you will need the kernel patch - posted at . + Wine should build on FreeBSD 4.x and FreeBSD 5.x, but versions before + FreeBSD 5.3 will generally not work properly. More information can be found in the FreeBSD ports tree at . diff --git a/libs/wine/mmap.c b/libs/wine/mmap.c index 6107fb089c0..a2528821886 100644 --- a/libs/wine/mmap.c +++ b/libs/wine/mmap.c @@ -174,6 +174,11 @@ void *wine_anon_mmap( void *start, size_t size, int prot, int flags ) 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 /* If available, this will attempt a fixed mapping in-kernel */ flags |= MAP_TRYFIXED;