summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/thin-provisioning-tools/files/0001-fix-compile-failed-with-libc-musl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/thin-provisioning-tools/files/0001-fix-compile-failed-with-libc-musl.patch')
-rw-r--r--meta-oe/recipes-support/thin-provisioning-tools/files/0001-fix-compile-failed-with-libc-musl.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/thin-provisioning-tools/files/0001-fix-compile-failed-with-libc-musl.patch b/meta-oe/recipes-support/thin-provisioning-tools/files/0001-fix-compile-failed-with-libc-musl.patch
new file mode 100644
index 0000000000..28b44da567
--- /dev/null
+++ b/meta-oe/recipes-support/thin-provisioning-tools/files/0001-fix-compile-failed-with-libc-musl.patch
@@ -0,0 +1,42 @@
1From 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