Skip to content

Commit a177842

Browse files
committed
Try to fix libzip on macos
1 parent 76ca6bf commit a177842

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

azure/macos/brew.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ parameters:
22
packages: ''
33

44
steps:
5+
- script: brew update
6+
displayName: 'Update Homebrew'
57
- script: |
68
brew install pkg-config \
79
autoconf \
@@ -23,11 +25,12 @@ steps:
2325
zlib \
2426
t1lib \
2527
gd \
26-
libzip \
2728
gmp \
2829
tidyp \
2930
libxml2 \
3031
libxslt \
3132
postgresql
33+
# Make sure we don't get broken libzip 1.7.0
34+
brew upgrade libzip
3235
brew link icu4c gettext --force
3336
displayName: 'Install Build Dependencies'

ext/zip/php_zip.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
#include "zend_interfaces.h"
3232
#include "php_zip.h"
3333

34+
#ifndef LIBZIP_VERSION_MAJOR
35+
# error You are likely using libzip 1.7.0, which is badly broken. Update to libzip 1.7.1
36+
#endif
37+
3438
/* zip_open is a macro for renaming libzip zipopen, so we need to use PHP_NAMED_FUNCTION */
3539
static PHP_NAMED_FUNCTION(zif_zip_open);
3640
static PHP_NAMED_FUNCTION(zif_zip_read);

0 commit comments

Comments
 (0)