From b87cbe2bec1d589621ba143af59443f63230ffeb Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 7 Feb 2018 14:11:26 -0500 Subject: [PATCH] Try fixing build for platforms that have no visibility attributes --- src/hb-private.hh | 1 + src/hb-subset.cc | 2 ++ src/main.cc | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/hb-private.hh b/src/hb-private.hh index 67ede7cce..75cc38f76 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -124,6 +124,7 @@ extern "C" void hb_free_impl(void *ptr); # define HB_INTERNAL __attribute__((__visibility__("hidden"))) # else # define HB_INTERNAL +# define HB_NO_VISIBILITY 1 # endif #endif diff --git a/src/hb-subset.cc b/src/hb-subset.cc index bb7d831fc..a1c6833e8 100644 --- a/src/hb-subset.cc +++ b/src/hb-subset.cc @@ -35,7 +35,9 @@ #include "hb-ot-glyf-table.hh" +#ifndef HB_NO_VISIBILITY const void * const OT::_hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {}; +#endif struct hb_subset_profile_t { diff --git a/src/main.cc b/src/main.cc index 72de189d8..d221e9da2 100644 --- a/src/main.cc +++ b/src/main.cc @@ -37,7 +37,9 @@ using namespace OT; +#ifndef HB_NO_VISIBILITY const void * const OT::_hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {}; +#endif int main (int argc, char **argv)