From: Oleg Date: Tue, 12 Mar 2013 07:06:53 +0000 (-0700) Subject: Conditionally include based on OS support. Define missing MAP_HUGETLB... X-Git-Tag: fio-2.0.15~34 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=a5e0ee11ec34cfc70a78aee4f7a2eeb01d9cf41f;p=fio.git Conditionally include based on OS support. Define missing MAP_HUGETLB for Android. Signed-off-by: Oleg Matcovschi Signed-off-by: Jens Axboe --- diff --git a/backend.c b/backend.c index d1fe9641..e482fb84 100644 --- a/backend.c +++ b/backend.c @@ -34,12 +34,12 @@ #include #include #include -#ifndef FIO_NO_HAVE_SHM_H -#include -#endif #include #include "fio.h" +#ifndef FIO_NO_HAVE_SHM_H +#include +#endif #include "hash.h" #include "smalloc.h" #include "verify.h" diff --git a/init.c b/init.c index c7226887..9d153182 100644 --- a/init.c +++ b/init.c @@ -9,13 +9,14 @@ #include #include #include -#ifndef FIO_NO_HAVE_SHM_H -#include -#endif #include #include #include "fio.h" +#ifndef FIO_NO_HAVE_SHM_H +#include +#endif + #include "parse.h" #include "smalloc.h" #include "filehash.h" diff --git a/memory.c b/memory.c index ee5f895d..443d71d4 100644 --- a/memory.c +++ b/memory.c @@ -5,12 +5,12 @@ #include #include #include -#ifndef FIO_NO_HAVE_SHM_H -#include -#endif #include #include "fio.h" +#ifndef FIO_NO_HAVE_SHM_H +#include +#endif static void *pinned_mem; diff --git a/os/os-android.h b/os/os-android.h index cedfdaf8..3bb44b95 100644 --- a/os/os-android.h +++ b/os/os-android.h @@ -31,6 +31,7 @@ #define FIO_HAVE_E4_ENG #define FIO_HAVE_BYTEORDER_FUNCS #define FIO_HAVE_MMAP_HUGE +#define FIO_NO_HAVE_SHM_H #define OS_MAP_ANON MAP_ANONYMOUS @@ -41,6 +42,9 @@ #ifdef MADV_REMOVE #define FIO_MADV_FREE MADV_REMOVE #endif +#ifndef MAP_HUGETLB +#define MAP_HUGETLB 0x40000 /* arch specific */ +#endif /*