diff options
| author | Antonin Descampe <antonin@gmail.com> | 2016-01-23 19:43:09 +0100 |
|---|---|---|
| committer | Antonin Descampe <antonin@gmail.com> | 2016-01-23 19:43:09 +0100 |
| commit | 3767af52deaa8e75c322961aa51f56b397de22af (patch) | |
| tree | 647378cdd41243a0c0c2bed24ce2d9b5bfffccfd /src/lib | |
| parent | 1b86fb6f488e85231bfee21d7831d66ee4da2b8b (diff) | |
| parent | c00ee8bff7cd6473021cb6f40199d25898d09250 (diff) | |
Merge pull request #648 from stweil/alloc
Fix support of posix_memalloc for Linux
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 |
