summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common.c b/src/common.c
index 57f465a..46e66ef 100644
--- a/src/common.c
+++ b/src/common.c
@@ -20,6 +20,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include "common.h"
@@ -40,7 +41,7 @@ int write_file(const char* filename, const void* data, size_t size) {
fclose(file);
if (bytes != size) {
- error("ERROR: Unable to write entire file: %s: %d of %d\n", filename, bytes, size);
+ error("ERROR: Unable to write entire file: %s: %d of %d\n", filename, (int)bytes, (int)size);
return -1;
}