summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mupdf/memento.h9
-rw-r--r--source/fitz/memento.c7
2 files changed, 9 insertions, 7 deletions
diff --git a/include/mupdf/memento.h b/include/mupdf/memento.h
index 8e501073..ee9bf4fb 100644
--- a/include/mupdf/memento.h
+++ b/include/mupdf/memento.h
@@ -161,15 +161,10 @@
#ifndef MEMENTO_H
-#include <stdlib.h>
-
-#ifdef __ANDROID__
-#define MEMENTO_ANDROID
-#include <stdio.h>
-#endif
-
#define MEMENTO_H
+#include <stddef.h> /* for size_t */
+
#ifndef MEMENTO_UNDERLYING_MALLOC
#define MEMENTO_UNDERLYING_MALLOC malloc
#endif
diff --git a/source/fitz/memento.c b/source/fitz/memento.c
index c96f1f1d..5676cafd 100644
--- a/source/fitz/memento.c
+++ b/source/fitz/memento.c
@@ -49,6 +49,13 @@ int atexit(void (*)(void));
#include <limits.h>
#endif
+#include <stdlib.h>
+
+#ifdef __ANDROID__
+#define MEMENTO_ANDROID
+#include <stdio.h>
+#endif
+
#ifdef MEMENTO
#ifndef MEMENTO_CPP_EXTRAS_ONLY