Merge "libpng: use GCC visibility to reduce shared library size"
diff --git a/Android.mk b/Android.mk
index 2a6eb43..d5c81d7 100644
--- a/Android.mk
+++ b/Android.mk
@@ -22,7 +22,8 @@
 	pngwtran.c \
 	pngwutil.c
 
-common_CFLAGS := ## -fomit-frame-pointer
+common_CFLAGS := \
+	-fvisibility=hidden ## -fomit-frame-pointer
 
 common_C_INCLUDES += \
 
diff --git a/pngconf.h b/pngconf.h
index defc16d..5760ba3 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1505,7 +1505,11 @@
 #  define PNGAPI
 #endif
 #ifndef PNG_IMPEXP
-#  define PNG_IMPEXP
+#  if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33)
+#    define PNG_IMPEXP  __attribute__((visibility ("default")))
+#  else
+#    define PNG_IMPEXP
+#  endif
 #endif
 
 #ifdef PNG_BUILDSYMS