Commit e0138c4a authored by Damjan Jovanovic's avatar Damjan Jovanovic Committed by Alexandre Julliard

libwine: Fix a regression in the return value check for mmap() on FreeBSD.

This fixes a regression from my previous patch in commit 55ba3648, which was checking for mmap() returning NULL instead of MAP_FAILED. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49225Signed-off-by: 's avatarDamjan Jovanovic <damjan.jov@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 410934a7
......@@ -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 ) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment