Commit 9c3aed09 authored by Jüri Valdmann's avatar Jüri Valdmann Committed by Commit Bot

GCC: Fix zlib symbol visibility macro

GCC parses the function __attribute__ syntax a bit differently from Clang,
associating the attribute with the return type instead of the function if the
return type is a pointer. This leads to certain zlib symbols, such as
Cr_z_zError, to fail to be properly exported from the shared library. Fix by
using ZEXTERN instead of ZEXPORT for the attribute which works the same for both
GCC and Clang.

Bug: 819294
Change-Id: I5707d1b0627a503df08df9ac0bb65fda69453989
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1859788Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705917}
parent 33ea392b
......@@ -13,7 +13,7 @@
#define ZEXTERN __declspec(dllimport)
#endif
#elif defined(ZLIB_IMPLEMENTATION)
#define ZEXPORT __attribute__((visibility("default")))
#define ZEXTERN __attribute__((visibility("default")))
#endif
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment