From 7e2aab171fd9a46c934f5d2c8c94f161f282482d Mon Sep 17 00:00:00 2001 From: Mickey Rose Date: Wed, 1 Feb 2017 03:01:38 +0100 Subject: [PATCH] include png.h outside any namespace --- src/image_options.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/image_options.cpp b/src/image_options.cpp index 441a6f0e4..fedf1f976 100644 --- a/src/image_options.cpp +++ b/src/image_options.cpp @@ -28,6 +28,13 @@ #include #pragma GCC diagnostic pop +#if defined(HAVE_PNG) +extern "C" +{ +#include +} +#endif // HAVE_PNG + namespace mapnik { namespace grammar { namespace x3 = boost::spirit::x3; @@ -76,10 +83,6 @@ image_options_map parse_image_options(std::string const& str) } #if defined(HAVE_PNG) -extern "C" -{ -#include -} int parse_png_filters(std::string const& str) { @@ -113,6 +116,7 @@ int parse_png_filters(std::string const& str) std::for_each(opts.begin(), opts.end(), [&filters] (int f) { filters |= f;}); return filters; } -#endif + +#endif // HAVE_PNG } // ns mapnik