diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-09-27 21:35:27 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2017-09-27 23:44:02 +0300 |
commit | 8d2a287da3abb0576512406227d0a3acd602123e (patch) | |
tree | a59cad05df9cf8816d150a450d6ee795aa34d4ae | |
parent | bf565ecf45bcdd3e098576731a2f815d6de2792f (diff) |
Avoid warning: 'inflateValidate' is only available on macOS 10.13 or newer
Change-Id: I0f828239ed5aff164ba1f4e486017db0e6c93a4a
-rw-r--r-- | external/libpng/UnpackedTarball_libpng.mk | 4 | ||||
-rw-r--r-- | external/libpng/libpng-osx.patch.1 | 16 |
2 files changed, 20 insertions, 0 deletions
diff --git a/external/libpng/UnpackedTarball_libpng.mk b/external/libpng/UnpackedTarball_libpng.mk index dca4e4b5cfe9..2a8ad3f84406 100644 --- a/external/libpng/UnpackedTarball_libpng.mk +++ b/external/libpng/UnpackedTarball_libpng.mk @@ -15,4 +15,8 @@ $(eval $(call gb_UnpackedTarball_add_files,libpng,.,\ external/libpng/configs/pnglibconf.h \ )) +$(eval $(call gb_UnpackedTarball_add_patches,libpng,\ + external/libpng/libpng-osx.patch.1 \ +)) + # vim: set noet sw=4 ts=4: diff --git a/external/libpng/libpng-osx.patch.1 b/external/libpng/libpng-osx.patch.1 new file mode 100644 index 000000000000..0e9d7336a762 --- /dev/null +++ b/external/libpng/libpng-osx.patch.1 @@ -0,0 +1,16 @@ +-*- Mode: Diff -*- + +Avoid warning: 'inflateValidate' is only available on macOS 10.13 or newer [-Wunguarded-availability-new] + +--- a/pngrutil.c ++++ b/pngrutil.c +@@ -419,7 +419,8 @@ + } + + #if ZLIB_VERNUM >= 0x1290 && \ +- defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_IGNORE_ADLER32) ++ defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_IGNORE_ADLER32) && \ ++ !(defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED < 101300) + if (((png_ptr->options >> PNG_IGNORE_ADLER32) & 3) == PNG_OPTION_ON) + /* Turn off validation of the ADLER32 checksum in IDAT chunks */ + ret = inflateValidate(&png_ptr->zstream, 0); |