Skip to content

Commit

Permalink
Added placeholders for MADV defines (#10881)
Browse files Browse the repository at this point in the history
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 rust-rocksdb/rust-rocksdb#697 for the specific error thrown.

I have just completed the CLA :)

Pull Request resolved: #10881

Reviewed By: akankshamahajan15

Differential Revision: D40726103

Pulled By: ajkr

fbshipit-source-id: 6b391636a74ef7e20d0daf47d332ddf0c14d5c34
  • Loading branch information
kwek20 authored and facebook-github-bot committed Nov 2, 2022
1 parent 781a387 commit d80baa1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions env/io_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d80baa1

Please sign in to comment.