summaryrefslogtreecommitdiff
path: root/camlibs/ax203/jpeg_memsrcdest.h
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-06-15 10:33:24 +0200
committerPatrick Ohly <patrick.ohly@intel.com>2016-06-15 10:53:37 +0200
commit0df14db3eda1b780a27b1c54bc8f251d15afebbc (patch)
treee87e52da628f489ec28ca42f7fa24ce750985429 /camlibs/ax203/jpeg_memsrcdest.h
parentb671f349a509c5a1238b7493ebd18456b3250053 (diff)
downloadlibgphoto2-0df14db3eda1b780a27b1c54bc8f251d15afebbc.tar.gz
jpeg_memsrcdest: extend feature check
libjpeg.h in OpenEmbedded master (from libjpeg-turbo 1.5.0) provides these methods if "JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)". The support for the jpeg_mem functions was added even when not emulating the libjpeg8 API, controlled via the MEM_SRCDST_SUPPORTED define, so checking for the version alone is not enough anymore. See https://github.com/libjpeg-turbo/libjpeg-turbo/commit/ab70623eb29e09e67222be5b9e1ea320fe5aa0e9 This fixes errors about conflicting declarations (signed vs. unsigned char). Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Diffstat (limited to 'camlibs/ax203/jpeg_memsrcdest.h')
-rw-r--r--camlibs/ax203/jpeg_memsrcdest.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/camlibs/ax203/jpeg_memsrcdest.h b/camlibs/ax203/jpeg_memsrcdest.h
index e97118246..b13bf3f40 100644
--- a/camlibs/ax203/jpeg_memsrcdest.h
+++ b/camlibs/ax203/jpeg_memsrcdest.h
@@ -1,5 +1,7 @@
#include <jpeglib.h>
+#if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED)
+
void
jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer,
unsigned long bufsize);
@@ -7,3 +9,5 @@ jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer,
void
jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer,
unsigned long * outsize);
+
+#endif