diff options
| author | Stefan Weil <sw@weilnetz.de> | 2015-11-01 20:37:19 +0100 |
|---|---|---|
| committer | Stefan Weil <sw@weilnetz.de> | 2016-01-06 18:06:45 +0100 |
| commit | c00ee8bff7cd6473021cb6f40199d25898d09250 (patch) | |
| tree | 526b966458e8eec727b64c1ad6f45a303598f090 /src/lib | |
| parent | a205f703283d42e1989da3670cb1c4bb5d8ae193 (diff) | |
Fix support of posix_memalign for Linux
posix_memalign is only declared conditionally in stdlib.h,
so add one of the possible definitions to get the declaration.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/openjp2/opj_config_private.h.cmake.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/openjp2/opj_config_private.h.cmake.in b/src/lib/openjp2/opj_config_private.h.cmake.in index b05822c3..c41f9066 100644 --- a/src/lib/openjp2/opj_config_private.h.cmake.in +++ b/src/lib/openjp2/opj_config_private.h.cmake.in @@ -28,6 +28,13 @@ /* check if function `posix_memalign` exists */ #cmakedefine OPJ_HAVE_POSIX_MEMALIGN +#if !defined(_POSIX_C_SOURCE) +#if defined(OPJ_HAVE_FSEEKO) || defined(OPJ_HAVE_POSIX_MEMALIGN) +/* Get declarations of fseeko, ftello, posix_memalign. */ +#define _POSIX_C_SOURCE 200112L +#endif +#endif + /* Byte order. */ /* All compilers that support Mac OS X define either __BIG_ENDIAN__ or __LITTLE_ENDIAN__ to match the endianness of the architecture being |
