summaryrefslogtreecommitdiffstats
path: root/src/strings.c
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2017-04-03 18:52:16 +0200
committerUlf Hermann <[email protected]>2017-05-04 12:28:35 +0000
commit741248144e6361548359ad7d9e394144a0312ecf (patch)
treeac07889ffbfe5bd09f8ce8a41f3dd35e05d3b237 /src/strings.c
parentf95af4ca39f5ff2073a2b0bc6e1bd0d3832b1a8f (diff)
Define roundup() for strings.c if it doesn't exist
Change-Id: I6ea7c1f894e89bbaaecb724473c4c00e67296f05 Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/strings.c')
-rw-r--r--src/strings.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/strings.c b/src/strings.c
index d214356c..22cbfaca 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -450,6 +450,9 @@ process_chunk (const char *fname, const unsigned char *buf, off_t to,
*unprinted = xstrndup ((const char *) start, curlen);
}
+#ifndef roundup
+#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
+#endif
/* Map a file in as large chunks as possible. */
static void *