Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d0b304b9
Commit
d0b304b9
authored
Dec 14, 2001
by
Bang Jun-Young
Committed by
Alexandre Julliard
Dec 14, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make use of solaris_try_mmap() for NetBSD. Rename it to
try_mmap_fixed() since it's no longer Solaris-specific.
parent
eda758eb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
port.c
library/port.c
+9
-7
No files found.
library/port.c
View file @
d0b304b9
...
...
@@ -40,7 +40,9 @@
#ifdef HAVE_LIBUTIL_H
# include <libutil.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
/***********************************************************************
* usleep
...
...
@@ -397,9 +399,9 @@ int getrlimit (int resource, struct rlimit *rlim)
#endif
/* HAVE_GETRLIMIT */
#if
def __svr4__
#if
defined(__svr4__) || defined(__NetBSD__)
/***********************************************************************
*
solaris_try_mmap
*
try_mmap_fixed
*
* The purpose of this routine is to emulate the behaviour of
* the Linux mmap() routine if a non-NULL address is passed,
...
...
@@ -415,7 +417,7 @@ int getrlimit (int resource, struct rlimit *rlim)
* address range is still available, and placing the mapping there
* using MAP_FIXED if so.
*/
static
int
solaris_try_mmap
(
void
*
addr
,
size_t
len
,
int
prot
,
int
flags
,
static
int
try_mmap_fixed
(
void
*
addr
,
size_t
len
,
int
prot
,
int
flags
,
int
fildes
,
off_t
off
)
{
char
*
volatile
result
=
NULL
;
...
...
@@ -442,7 +444,7 @@ static int solaris_try_mmap (void *addr, size_t len, int prot, int flags,
if
(
(
pid
=
vfork
())
==
-
1
)
{
perror
(
"
solaris_try_mmap
: vfork"
);
perror
(
"
try_mmap_fixed
: vfork"
);
exit
(
1
);
}
if
(
pid
==
0
)
...
...
@@ -508,8 +510,8 @@ void *wine_anon_mmap( void *start, size_t size, int prot, int flags )
flags
|=
MAP_PRIVATE
;
#endif
#if
def __svr4__
if
(
solaris_try_mmap
(
start
,
size
,
prot
,
flags
,
fdzero
,
0
)
)
#if
defined(__svr4__) || defined(__NetBSD__)
if
(
try_mmap_fixed
(
start
,
size
,
prot
,
flags
,
fdzero
,
0
)
)
return
start
;
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment