diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/codec/SkCodec_libpng.h | 8 | ||||
-rw-r--r-- | src/images/SkImageDecoder_libpng.cpp | 7 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/codec/SkCodec_libpng.h b/src/codec/SkCodec_libpng.h index d21a131100..103839b314 100644 --- a/src/codec/SkCodec_libpng.h +++ b/src/codec/SkCodec_libpng.h @@ -12,9 +12,11 @@ #include "SkRefCnt.h" #include "SkSwizzler.h" -extern "C" { - #include "png.h" -} +#ifdef SKIA_PNG_PREFIXED + // this must proceed png.h + #include "pngprefix.h" +#endif +#include "png.h" class SkScanlineDecoder; class SkStream; diff --git a/src/images/SkImageDecoder_libpng.cpp b/src/images/SkImageDecoder_libpng.cpp index 4101b3e4ec..44aa8e2e64 100644 --- a/src/images/SkImageDecoder_libpng.cpp +++ b/src/images/SkImageDecoder_libpng.cpp @@ -17,9 +17,12 @@ #include "SkTemplates.h" #include "SkUtils.h" #include "transform_scanline.h" -extern "C" { + +#ifdef SKIA_PNG_PREFIXED + // this must proceed png.h + #include "pngprefix.h" +#endif #include "png.h" -} /* These were dropped in libpng >= 1.4 */ #ifndef png_infopp_NULL |