summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/fitz/compress.c2
-rw-r--r--source/fitz/load-png.c1
-rw-r--r--source/fitz/output-cbz.c6
-rw-r--r--source/fitz/output-svg.c2
-rw-r--r--source/helpers/pkcs7/pkcs7-openssl.c1
-rw-r--r--source/pdf/pdf-appearance.c1
-rw-r--r--source/pdf/pdf-write.c1
7 files changed, 12 insertions, 2 deletions
diff --git a/source/fitz/compress.c b/source/fitz/compress.c
index 439c461e..4fc9b653 100644
--- a/source/fitz/compress.c
+++ b/source/fitz/compress.c
@@ -2,6 +2,8 @@
#include <zlib.h>
+#include <limits.h>
+
static void *fz_z_alloc(void *opaque, unsigned int count, unsigned int size)
{
fz_context *ctx = (fz_context *)opaque;
diff --git a/source/fitz/load-png.c b/source/fitz/load-png.c
index 55dd8fe7..c5bc925c 100644
--- a/source/fitz/load-png.c
+++ b/source/fitz/load-png.c
@@ -2,6 +2,7 @@
#include <zlib.h>
+#include <limits.h>
#include <string.h>
struct info
diff --git a/source/fitz/output-cbz.c b/source/fitz/output-cbz.c
index 0abeb1a4..1eb0e473 100644
--- a/source/fitz/output-cbz.c
+++ b/source/fitz/output-cbz.c
@@ -1,11 +1,13 @@
#include "mupdf/fitz.h"
+#include <zlib.h>
+
+#include <limits.h>
+
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
-#include <zlib.h>
-
typedef struct fz_cbz_writer_s fz_cbz_writer;
struct fz_cbz_writer_s
diff --git a/source/fitz/output-svg.c b/source/fitz/output-svg.c
index 8895960a..2bafda75 100644
--- a/source/fitz/output-svg.c
+++ b/source/fitz/output-svg.c
@@ -1,5 +1,7 @@
#include "mupdf/fitz.h"
+#include <limits.h>
+
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
diff --git a/source/helpers/pkcs7/pkcs7-openssl.c b/source/helpers/pkcs7/pkcs7-openssl.c
index a9916f5c..7bbda55e 100644
--- a/source/helpers/pkcs7/pkcs7-openssl.c
+++ b/source/helpers/pkcs7/pkcs7-openssl.c
@@ -3,6 +3,7 @@
#include "../../fitz/fitz-imp.h"
#include "mupdf/helpers/pkcs7-openssl.h"
+#include <limits.h>
#include <string.h>
/* Generated from resources/certs/AdobeCA.p7c */
diff --git a/source/pdf/pdf-appearance.c b/source/pdf/pdf-appearance.c
index bca9da86..4d243e3e 100644
--- a/source/pdf/pdf-appearance.c
+++ b/source/pdf/pdf-appearance.c
@@ -2,6 +2,7 @@
#include "mupdf/pdf.h"
#include <float.h>
+#include <limits.h>
#include <math.h>
#include <ft2build.h>
diff --git a/source/pdf/pdf-write.c b/source/pdf/pdf-write.c
index 7b163813..2d5b5372 100644
--- a/source/pdf/pdf-write.c
+++ b/source/pdf/pdf-write.c
@@ -5,6 +5,7 @@
#include <zlib.h>
#include <assert.h>
+#include <limits.h>
#include <string.h>
#include <stdio.h> /* for debug printing */