summaryrefslogtreecommitdiff
path: root/src/lib/openjp2
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/openjp2')
-rw-r--r--src/lib/openjp2/opj_config_private.h.cmake.in7
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