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 <tytso@mit.edu>
[bvanassche: elaborated commit message]
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
const char *dev;
int c;
std::vector<uint8_t> buf;
- size_t len = 512;
+ unsigned long len = 512;
while ((c = getopt(argc, argv, "hl:o:sw")) != EOF) {
switch (c) {