diff --git a/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp b/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp index 9f7f4c389..115203322 100644 --- a/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp +++ b/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp @@ -70,12 +70,14 @@ namespace osgDBJPEG static int jpegerror = ERR_NO_ERROR; -/* Some versions of jmorecfg.h define boolean, some don't... - Those that do also define HAVE_BOOLEAN, so we can guard using that. */ -#ifndef HAVE_BOOLEAN - typedef int boolean; - #define FALSE 0 - #define TRUE 1 +#if JPEG_LIB_VERSION < 90 + /* Some versions of jmorecfg.h define boolean, some don't... + Those that do also define HAVE_BOOLEAN, so we can guard using that. */ + #ifndef HAVE_BOOLEAN + typedef int boolean; + #define FALSE 0 + #define TRUE 1 + #endif #endif /* CODE FOR READING/WRITING JPEG FROM STREAMS