diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2019-10-15 12:10:55 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-15 12:10:55 +0000 |
commit | d6d7cb80b8f35d0ff7478468fc75d87e0e2eda28 (patch) | |
tree | c20d8ef556de63b390d71be6813409884b079cde /chromeconf.h | |
parent | ddebad26cfadeb4ecdfe3da8beb396a85cf90c91 (diff) | |
download | zlib-d6d7cb80b8f35d0ff7478468fc75d87e0e2eda28.tar.gz |
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/+/1859788
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#705917}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9c3aed099b010a75594a0efd523774c4c9a5e3d2
Diffstat (limited to 'chromeconf.h')
-rw-r--r-- | chromeconf.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chromeconf.h b/chromeconf.h index e9aa386..666093d 100644 --- a/chromeconf.h +++ b/chromeconf.h @@ -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 |