From 6ca9b06dc3d848b89a6f4d4a2001e4df6600f5ca Mon Sep 17 00:00:00 2001 From: Omri Mor Date: Sun, 30 Apr 2017 17:09:22 -0700 Subject: [PATCH] os/os-android.h: fix shared memory support Fixes: #352 ("Android and shared memory") Signed-off-by: Omri Mor --- os/os-android.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.25.1