From: Omri Mor Date: Mon, 1 May 2017 00:09:22 +0000 (-0700) Subject: os/os-android.h: fix shared memory support X-Git-Tag: fio-2.20~18 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=6ca9b06dc3d848b89a6f4d4a2001e4df6600f5ca;p=fio.git os/os-android.h: fix shared memory support Fixes: #352 ("Android and shared memory") Signed-off-by: Omri Mor --- diff --git a/os/os-android.h b/os/os-android.h index ba599ddd..6c3e0985 100644 --- a/os/os-android.h +++ b/os/os-android.h @@ -57,18 +57,17 @@ #define MAP_HUGETLB 0x40000 /* arch specific */ #endif - +#ifndef CONFIG_NO_SHM /* * The Android NDK doesn't currently export , so define the * necessary stuff here. */ -#include +#include #define SHM_HUGETLB 04000 #include #include -#include #define ASHMEM_DEVICE "/dev/ashmem" @@ -126,6 +125,7 @@ static inline int shmdt (const void *__shmaddr) size = *ptr; //find mmap size which we stored at the beginning of the buffer return munmap((void *)ptr, size + sizeof(size_t)); } +#endif #define SPLICE_DEF_SIZE (64*1024)