From a0ece13ad7ab2aae760e09e41e0459bd999a3695 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Wed, 14 Jun 2017 00:02:40 +0200 Subject: [PATCH] thin-provisioning-tools: fix musl --- .../patches/musl.patch | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 srcpkgs/thin-provisioning-tools/patches/musl.patch diff --git a/srcpkgs/thin-provisioning-tools/patches/musl.patch b/srcpkgs/thin-provisioning-tools/patches/musl.patch new file mode 100644 index 00000000000..889e0019a36 --- /dev/null +++ b/srcpkgs/thin-provisioning-tools/patches/musl.patch @@ -0,0 +1,42 @@ +--- block-cache/io_engine.h.orig 2017-03-27 15:00:54.000000000 +0200 ++++ block-cache/io_engine.h 2017-06-13 23:49:37.403053236 +0200 +@@ -10,13 +10,17 @@ + #include + #include + ++#include ++#ifndef PAGE_SIZE ++#define PAGE_SIZE sysconf(_SC_PAGE_SIZE) ++#endif ++ + //---------------------------------------------------------------- + + namespace bcache { + using sector_t = uint64_t; + + unsigned const SECTOR_SHIFT = 9; +- unsigned const PAGE_SIZE = 4096; + + // Virtual base class to aid unit testing + class io_engine { +--- unit-tests/io_engine_t.cc.orig 2017-03-27 15:00:54.000000000 +0200 ++++ unit-tests/io_engine_t.cc 2017-06-13 23:58:17.674546348 +0200 +@@ -23,6 +23,10 @@ + + + #include ++#include ++#ifndef PAGE_SIZE ++#define PAGE_SIZE sysconf(_SC_PAGE_SIZE) ++#endif + + using namespace boost; + using namespace std; +@@ -33,7 +37,6 @@ + + namespace { + unsigned const MAX_IO = 64; +- unsigned const PAGE_SIZE = 4096; + + class IOEngineTests : public Test { + public: