diff options
author | Robert Swiecki <robert@swiecki.net> | 2019-09-11 15:15:57 +0200 |
---|---|---|
committer | Robert Swiecki <robert@swiecki.net> | 2019-09-11 15:15:57 +0200 |
commit | e31da44706a74f7bf9f7f57d45433e8c67fe7dca (patch) | |
tree | dca25a7961bed70ca4a1e560427109ac125b7761 /libhfcommon | |
parent | 2fb8e0451586a85341374b6a1ce41b50990d96c3 (diff) | |
download | honggfuzz-e31da44706a74f7bf9f7f57d45433e8c67fe7dca.tar.gz |
libhfcommon: use MAP_HASSEMAPHORE if present
Diffstat (limited to 'libhfcommon')
-rw-r--r-- | libhfcommon/files.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libhfcommon/files.c b/libhfcommon/files.c index 330bc5e6..9c0bea5a 100644 --- a/libhfcommon/files.c +++ b/libhfcommon/files.c @@ -437,6 +437,10 @@ void* files_mapSharedMem(size_t sz, int* fd, const char* name, bool nocore) { */ mmapflags |= MAP_NOSYNC; #endif /* defined(MAP_NOSYNC) */ +#if defined(MAP_HASSEMAPHORE) + mmapflags |= MAP_HASSEMAPHORE; + /* Our shared/mmap'd pages can have mutexes in them */ +#endif /* defined(MAP_HASSEMAPHORE) */ if (nocore) { #if defined(MAP_CONCEAL) mmapflags |= MAP_CONCEAL; |