From: Jens Axboe Date: Tue, 27 Nov 2012 07:27:50 +0000 (+0100) Subject: Fix compile for older Linux without mmap MAP_HUGETLB X-Git-Tag: fio-2.0.12~47 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=39b9356872f27c1a48a2ab09a5252dffd1de22d2 Fix compile for older Linux without mmap MAP_HUGETLB Signed-off-by: Jens Axboe --- diff --git a/os/os-linux.h b/os/os-linux.h index 9b7ff29e..e9d7cf3e 100644 --- a/os/os-linux.h +++ b/os/os-linux.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -47,6 +48,10 @@ #define FIO_USE_GENERIC_INIT_RANDOM_STATE #define FIO_HAVE_E4_ENG +#ifdef MAP_HUGETLB +#define FIO_HAVE_MMAP_HUGE +#endif + /* * Can only enable this for newer glibcs, or the header and defines are * missing diff --git a/os/os.h b/os/os.h index e150284e..dd704647 100644 --- a/os/os.h +++ b/os/os.h @@ -115,6 +115,10 @@ typedef unsigned long os_cpu_mask_t; #endif #endif +#ifndef FIO_HAVE_MMAP_HUGE +#define MAP_HUGETLB 0 +#endif + #ifndef FIO_O_NOATIME #define FIO_O_NOATIME 0 #endif