diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2017-03-14 10:49:00 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2017-03-14 10:52:42 +0200 |
commit | edd127ee7658ceb7f5f2f740bce75db1cbf25c0e (patch) | |
tree | 80734bd2df644d9c43d89b0cdff579a0912fcf4c /src/mbgl | |
parent | 58b3bfbd0001f47fd88288e250d2028173dc0b23 (diff) | |
download | qtlocation-mapboxgl-edd127ee7658ceb7f5f2f740bce75db1cbf25c0e.tar.gz |
[build] Fix build when using a Z_PREFIX zlib
It will redefine mbgl::util::compress to mbgl::util::z_compress and
cause a link error. Aka pre-processor hell.
Diffstat (limited to 'src/mbgl')
-rw-r--r-- | src/mbgl/util/compression.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mbgl/util/compression.cpp b/src/mbgl/util/compression.cpp index 18cb189d02..832c38b8d5 100644 --- a/src/mbgl/util/compression.cpp +++ b/src/mbgl/util/compression.cpp @@ -22,6 +22,11 @@ const static bool zlibVersionCheck __attribute__((unused)) = []() { namespace mbgl { namespace util { +// Needed when using a zlib compiled with -DZ_PREFIX +// because it will mess with this function name and +// cause a link error. +#undef z_compress + std::string compress(const std::string &raw) { z_stream deflate_stream; memset(&deflate_stream, 0, sizeof(deflate_stream)); |