Don't use %z printf format Some libc's don't support it. Signed-off-by: Ran Benita <ran234@gmail.com>
diff --git a/src/xkbcomp/action.c b/src/xkbcomp/action.c
index 47d273c..900ec2d 100644
--- a/src/xkbcomp/action.c
+++ b/src/xkbcomp/action.c
@@ -784,9 +784,9 @@ HandlePrivate(struct xkb_keymap *keymap, union xkb_action *action,
if (ndx < 0 || ndx >= sizeof(act->data)) {
log_err(keymap->ctx,
- "The data for a private action is %zu bytes long; "
+ "The data for a private action is %lu bytes long; "
"Attempt to use data[%d] ignored\n",
- sizeof(act->data), ndx);
+ (unsigned long) sizeof(act->data), ndx);
return false;
}
diff --git a/test/stringcomp.c b/test/stringcomp.c
index e95a3c4..e93791a 100644
--- a/test/stringcomp.c
+++ b/test/stringcomp.c
@@ -55,8 +55,9 @@ main(int argc, char *argv[])
"round-trip test failed: dumped map differs from original\n");
fprintf(stderr, "path to original file: %s\n",
test_get_path(DATA_PATH));
- fprintf(stderr, "length: dumped %zu, original %zu\n",
- strlen(dump), strlen(original));
+ fprintf(stderr, "length: dumped %lu, original %lu\n",
+ (unsigned long) strlen(dump),
+ (unsigned long) strlen(original));
fprintf(stderr, "dumped map:\n");
fprintf(stderr, "%s\n", dump);
fflush(stderr);