-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Description
Expected behavior
When building for Android, the following build errors are reported:
/builds/aerys/embedb/build/third_party/rocksdb/src/rocksdb/env/env_posix.cc:650:9: error: use of undeclared identifier 'major'
if (major(statbuf[0].st_dev) != major(statbuf[1].st_dev) ||
^
/builds/aerys/embedb/build/third_party/rocksdb/src/rocksdb/env/env_posix.cc:650:37: error: use of undeclared identifier 'major'
if (major(statbuf[0].st_dev) != major(statbuf[1].st_dev) ||
^
/builds/aerys/embedb/build/third_party/rocksdb/src/rocksdb/env/env_posix.cc:651:9: error: use of undeclared identifier 'minor'
minor(statbuf[0].st_dev) != minor(statbuf[1].st_dev) ||
^
/builds/aerys/embedb/build/third_party/rocksdb/src/rocksdb/env/env_posix.cc:651:37: error: use of undeclared identifier 'minor'
minor(statbuf[0].st_dev) != minor(statbuf[1].st_dev) ||
^
4 errors generated.
Actual behavior
Should build without error for Android.
Steps to reproduce the behavior
Build rocksdb 5.14.2 targetting Android.
The problem comes from this commit:
Specifically, this #include should also be made when targeting Android:
https://github.com/facebook/rocksdb/blob/master/env/env_posix.cc#L26
Therefore, this:
#if defined(OS_LINUX) || defined(OS_SOLARIS)
#include <sys/statfs.h>
#include <sys/syscall.h>
#include <sys/sysmacros.h>
#endifshould become this:
#if defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_ANDROID)
#include <sys/statfs.h>
#include <sys/syscall.h>
#include <sys/sysmacros.h>
#endifTesting and preparing a PR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels