blob: 28b44da567ac92321b41d965b4e39c0e295e73cb [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From fcbcf9c494cca166106ae4cb03c1dd135ee4f25c Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 1 Aug 2018 09:34:00 +0800
4Subject: [PATCH] fix compile failed with libc musl
5
6There is a failure while compiling with libc musl:
7[snip]
8|./block-cache/io_engine.h:18:17: error: expected
9unqualified-id before numeric constant
10| unsigned const PAGE_SIZE = 4096;
11[snip]
12
13The musl defeines macro PAGE_SIZE, undef it conditionally
14could fix the issue.
15
16http://musl.openwall.narkive.com/tO8vrHdP/why-musl-define-page-size
17
18Upstream-Status: Submitted [git://github.com/jthornber/thin-provisioning-tools]
19
20Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
21---
22 block-cache/io_engine.h | 4 ++++
23 1 file changed, 4 insertions(+)
24
25diff --git a/block-cache/io_engine.h b/block-cache/io_engine.h
26index 1704251..e36b932 100644
27--- a/block-cache/io_engine.h
28+++ b/block-cache/io_engine.h
29@@ -12,6 +12,10 @@
30
31 //----------------------------------------------------------------
32
33+// Musl defines
34+#ifdef PAGE_SIZE
35+#undef PAGE_SIZE
36+#endif
37 namespace bcache {
38 using sector_t = uint64_t;
39
40--
412.7.4
42