fix compile failed with libc musl (#103)

There is a failure while compiling with libc musl:
[snip]
|./block-cache/io_engine.h:18:17: error: expected
unqualified-id before numeric constant
|  unsigned const PAGE_SIZE = 4096;
[snip]

The musl defeines macro PAGE_SIZE, undef it conditionally
could fix the issue.

http://musl.openwall.narkive.com/tO8vrHdP/why-musl-define-page-size

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
This commit is contained in:
hongxu-jia 2018-08-01 14:10:26 +08:00 committed by Joe Thornber
parent 82ff03e5c1
commit 9311aa6483

View File

@ -17,6 +17,10 @@
//----------------------------------------------------------------
// Musl defines
#ifdef PAGE_SIZE
#undef PAGE_SIZE
#endif
namespace bcache {
using sector_t = uint64_t;