From 6c55ffd2f7758d450b168e6f94ad69631d317ec1 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 3 Nov 2015 08:55:10 +0100 Subject: [PATCH] Add missing include statement for ssize_t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compilation of code which uses libtiff fails when ssize_t is undefined: openjpeg/thirdparty/libtiff/tif_config.h:324:22: error: unknown type name ‘ssize_t’ #define TIFF_SSIZE_T ssize_t ^ openjpeg/thirdparty/libtiff/tiffio.h:67:9: note: in expansion of macro ‘TIFF_SSIZE_T’ typedef TIFF_SSIZE_T tmsize_t; ^ Add the missing include statement (not for Windows which does not provide unistd.h). Signed-off-by: Stefan Weil --- src/bin/jp2/converttif.c | 3 +++ tests/compare_images.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/bin/jp2/converttif.c b/src/bin/jp2/converttif.c index dbda0741..c83d09ef 100644 --- a/src/bin/jp2/converttif.c +++ b/src/bin/jp2/converttif.c @@ -42,6 +42,9 @@ #include #include #include +#ifndef _WIN32 +#include +#endif #ifndef OPJ_HAVE_LIBTIFF # error OPJ_HAVE_LIBTIFF_NOT_DEFINED diff --git a/tests/compare_images.c b/tests/compare_images.c index b28d4957..e01603a7 100644 --- a/tests/compare_images.c +++ b/tests/compare_images.c @@ -37,6 +37,9 @@ #include #include #include +#ifndef _WIN32 +#include +#endif #include "opj_apps_config.h" #include "opj_getopt.h"