libwine: Fix a regression in the return value check for mmap() on FreeBSD.
This fixes a regression from my previous patch in commit
55ba364837
, which was
checking for mmap() returning NULL instead of MAP_FAILED.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49225
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
410934a762
commit
e0138c4a6a
|
@ -215,7 +215,7 @@ void *wine_anon_mmap( void *start, size_t size, int prot, int flags )
|
|||
/* If available, this will attempt a fixed mapping in-kernel */
|
||||
flags |= MAP_TRYFIXED;
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
if ( start && mmap( start, size, prot, flags | MAP_FIXED | MAP_EXCL, get_fdzero(), 0 ) )
|
||||
if ( start && mmap( start, size, prot, flags | MAP_FIXED | MAP_EXCL, get_fdzero(), 0 ) != MAP_FAILED )
|
||||
return start;
|
||||
#elif defined(__svr4__) || defined(__NetBSD__) || defined(__APPLE__)
|
||||
if ( try_mmap_fixed( start, size, prot, flags, get_fdzero(), 0 ) )
|
||||
|
|
Loading…
Reference in New Issue