From d80baa139638a93e22b4572f5645b48036adb829 Mon Sep 17 00:00:00 2001 From: Brord van Wierst Date: Wed, 2 Nov 2022 14:42:42 -0700 Subject: [PATCH] Added placeholders for MADV defines (#10881) Summary: Cross compiling rocksdb with rust bindings to android leads to an error since 7.4.0 (Incusion of madvise) This is due to missing placeholders for non-linux platforms. This PR adds the missing placeholders. See https://github.com/rust-rocksdb/rust-rocksdb/issues/697 for the specific error thrown. I have just completed the CLA :) Pull Request resolved: https://github.com/facebook/rocksdb/pull/10881 Reviewed By: akankshamahajan15 Differential Revision: D40726103 Pulled By: ajkr fbshipit-source-id: 6b391636a74ef7e20d0daf47d332ddf0c14d5c34 --- env/io_posix.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/env/io_posix.h b/env/io_posix.h index 7307b2031..f129668ea 100644 --- a/env/io_posix.h +++ b/env/io_posix.h @@ -35,6 +35,12 @@ #define POSIX_FADV_SEQUENTIAL 2 /* [MC1] expect sequential page refs */ #define POSIX_FADV_WILLNEED 3 /* [MC1] will need these pages */ #define POSIX_FADV_DONTNEED 4 /* [MC1] don't need these pages */ + +#define POSIX_MADV_NORMAL 0 /* [MC1] no further special treatment */ +#define POSIX_MADV_RANDOM 1 /* [MC1] expect random page refs */ +#define POSIX_MADV_SEQUENTIAL 2 /* [MC1] expect sequential page refs */ +#define POSIX_MADV_WILLNEED 3 /* [MC1] will need these pages */ +#define POSIX_MADV_DONTNEED 4 /* [MC1] don't need these pages */ #endif namespace ROCKSDB_NAMESPACE {