From fc59cfd5fe0adb57f9056cdcd2071ace09ac3f2d Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 30 Oct 2018 10:36:49 -0400 Subject: [PATCH] Fix build failure for discontiguous-io on 32-bit platforms Avoid that building with a 32-bit compiler fails as follows: discontiguous-io.cpp:294:34: error: no matching function for call to 'min(long unsigned int, size_t)' std::min(4ul, len - i * 4)); ^ Signed-off-by: Theodore Ts'o [bvanassche: elaborated commit message] Signed-off-by: Bart Van Assche --- src/discontiguous-io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discontiguous-io.cpp b/src/discontiguous-io.cpp index 5e0ee0f..f51a305 100644 --- a/src/discontiguous-io.cpp +++ b/src/discontiguous-io.cpp @@ -251,7 +251,7 @@ int main(int argc, char **argv) const char *dev; int c; std::vector buf; - size_t len = 512; + unsigned long len = 512; while ((c = getopt(argc, argv, "hl:o:sw")) != EOF) { switch (c) { -- 2.49.0