From 57fc514bab7f9210fd7bebfe3b437952eb775e14 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sat, 3 Dec 2016 15:05:29 -0800 Subject: [PATCH] pnmimagetypes: Try to work around the INLINE macro getting redefined by jpeglib. --- panda/src/pnmimagetypes/pnmFileTypeJPG.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panda/src/pnmimagetypes/pnmFileTypeJPG.h b/panda/src/pnmimagetypes/pnmFileTypeJPG.h index 2dcd506322..60afc861d0 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeJPG.h +++ b/panda/src/pnmimagetypes/pnmFileTypeJPG.h @@ -37,11 +37,17 @@ #endif +// jpeglib sometimes redefines the INLINE macro and breaks inlining +// (on e.g. Ubuntu 12.04) so we need to preserve it somehow - this uses the +// MSVC push_macro/pop_macro pragmas, which are also supported on GCC and +// Clang, but may not be cross-compiler enough to merge up to master. Hrm. :/ +#pragma push_macro("INLINE") extern "C" { #include // jpeglib requires this to be included first. #include #include } +#pragma pop_macro("INLINE") /** * For reading and writing Jpeg files.