PATCH: revive FreeBSD support
Gerald Pfeifer
gerald at pfeifer.com
Tue Dec 14 15:55:31 CST 2004
On Tue, 14 Dec 2004, Alexandre Julliard wrote:
> Looks OK, but this is a job for wine_anon_mmap, it's supposed to
> abstract these sorts of platform dependencies so that the callers
> don't have to worry about it.
How about the following?
Gerald
ChangeLog:
Make us work on FreeBSD again by working around their different
mmap() implementation.
Index: README
===================================================================
RCS file: /home/wine/wine/README,v
retrieving revision 1.47
diff -u -3 -p -r1.47 README
--- README 21 Nov 2004 15:33:00 -0000 1.47
+++ README 14 Dec 2004 22:30:53 -0000
@@ -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 <http://www.freebsd.org/cgi/query-pr.cgi?pr=73092>.
+ 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
<ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/emulators/wine/>.
Index: libs/wine/mmap.c
===================================================================
RCS file: /home/wine/wine/libs/wine/mmap.c,v
retrieving revision 1.8
diff -u -3 -p -r1.8 mmap.c
--- libs/wine/mmap.c 4 Nov 2004 04:52:48 -0000 1.8
+++ libs/wine/mmap.c 14 Dec 2004 22:31:08 -0000
@@ -150,6 +150,12 @@ void *wine_anon_mmap( void *start, size_
#ifdef HAVE_MMAP
static int fdzero = -1;
+#ifdef __FreeBSD__
+ /* Even FreeBSD 5.3 does not properly support NULL here. */
+ if( start == NULL )
+ start=(void *)0x110000;
+#endif
+
#ifdef MAP_ANON
flags |= MAP_ANON;
#else
More information about the wine-devel
mailing list