Skip to content

Commit

Permalink
Add missing include statement for ssize_t
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
stweil committed Nov 3, 2015
1 parent 38ffbbe commit c9540b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bin/jp2/converttif.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#ifndef _WIN32
#include <unistd.h>
#endif

#ifndef OPJ_HAVE_LIBTIFF
# error OPJ_HAVE_LIBTIFF_NOT_DEFINED
Expand Down
3 changes: 3 additions & 0 deletions tests/compare_images.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
#include <string.h>
#include <ctype.h>
#include <assert.h>
#ifndef _WIN32
#include <unistd.h>
#endif

#include "opj_apps_config.h"
#include "opj_getopt.h"
Expand Down

0 comments on commit c9540b2

Please sign in to comment.