summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog4
-rw-r--r--src/strings.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 64db1cab..4a32604f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2017-05-04 Ulf Hermann <[email protected]>
+
+ * strings.c: If roundup() is not defined, define it.
+
2017-04-28 Ulf Hermann <[email protected]>
* Makefile.am: Use the predefined names for libelf, libdw, libasm,
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 *