Subject: Re: Wine & NetBSD?
To: None <jmcneill@invisible.yi.org>
From: Bang Jun-Young <bjy@mogua.org>
List: tech-kern
Date: 11/16/2001 10:48:03
On Thu, Nov 15, 2001 at 06:53:05PM -0400, jmcneill@invisible.yi.org wrote:
> Mind sharing your Wine sources with the rest of us? ;)
1. Download Wine-20011108.tar.gz
2. Apply the following patch
3. configure & make & make install
4. Run wine sol.exe :)
Note: the patch was sent to wine-patches, but wasn't accepted.
I have to prove it's not dangerous (or if it's really dangerous,
find another way).
Question: Does any MAP_FIXED mapping zap the previous mapping at
that address?
Index: memory/virtual.c
===================================================================
RCS file: /home/wine/wine/memory/virtual.c,v
retrieving revision 1.70
diff -u -r1.70 virtual.c
--- memory/virtual.c 2001/11/06 20:57:23 1.70
+++ memory/virtual.c 2001/11/14 22:37:41
@@ -498,7 +498,7 @@
/* zero-map the whole range */
if ((ptr = wine_anon_mmap( base, total_size,
- PROT_READ | PROT_WRITE | PROT_EXEC, 0 )) == (char *)-1)
+ PROT_READ | PROT_WRITE | PROT_EXEC, MAP_FIXED )) == (char *)-1)
{
ptr = wine_anon_mmap( NULL, total_size,
PROT_READ | PROT_WRITE | PROT_EXEC, 0 );
Index: msdos/dosmem.c
===================================================================
RCS file: /home/wine/wine/msdos/dosmem.c,v
retrieving revision 1.33
diff -u -r1.33 dosmem.c
--- msdos/dosmem.c 2001/11/06 20:57:24 1.33
+++ msdos/dosmem.c 2001/11/14 22:37:45
@@ -451,7 +451,7 @@
int sys_offset = 0;
int page_size = getpagesize();
void *addr = wine_anon_mmap( (void *)page_size, 0x110000-page_size,
- PROT_READ | PROT_WRITE | PROT_EXEC, 0 );
+ PROT_READ | PROT_WRITE | PROT_EXEC, MAP_FIXED );
if (addr == (void *)page_size) /* we got what we wanted */
{
/* now map from address 0 */
Jun-Young
--
Bang Jun-Young <bjy@mogua.org>