summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-05-12 17:55:50 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-05-18 00:37:18 +0200
commit5f0128e1e0e0deef350df659da69dddfc2cec0c7 (patch)
treee32574c15aae2e2214caf1bfe224b12140de6bc9
parentbc9497695e8d3a9fbb0a3d806598bab91926b3aa (diff)
downloadphp-git-5f0128e1e0e0deef350df659da69dddfc2cec0c7.tar.gz
Fix [-Wundef] warning in ZIP extension
-rw-r--r--ext/zip/php_zip.c4
-rw-r--r--ext/zip/zip_stream.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c
index c68bb3ccb2..837c7d383b 100644
--- a/ext/zip/php_zip.c
+++ b/ext/zip/php_zip.c
@@ -3323,7 +3323,7 @@ static PHP_MINIT_FUNCTION(zip)
#endif
REGISTER_ZIP_CLASS_CONST_LONG("EM_UNKNOWN", ZIP_EM_UNKNOWN);
-#if HAVE_LIBZIP_VERSION
+#ifdef HAVE_LIBZIP_VERSION
zend_declare_class_constant_string(zip_class_entry, "LIBZIP_VERSION", sizeof("LIBZIP_VERSION")-1, zip_libzip_version());
#else
zend_declare_class_constant_string(zip_class_entry, "LIBZIP_VERSION", sizeof("LIBZIP_VERSION")-1, LIBZIP_VERSION);
@@ -3356,7 +3356,7 @@ static PHP_MINFO_FUNCTION(zip)
php_info_print_table_row(2, "Zip", "enabled");
php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION);
-#if HAVE_LIBZIP_VERSION
+#ifdef HAVE_LIBZIP_VERSION
php_info_print_table_row(2, "Libzip headers version", LIBZIP_VERSION);
php_info_print_table_row(2, "Libzip library version", zip_libzip_version());
#else
diff --git a/ext/zip/zip_stream.c b/ext/zip/zip_stream.c
index 58fcb0322b..abdbffcd47 100644
--- a/ext/zip/zip_stream.c
+++ b/ext/zip/zip_stream.c
@@ -18,7 +18,7 @@
# include "config.h"
#endif
#include "php.h"
-#if HAVE_ZIP
+#ifdef HAVE_ZIP
#include "php_streams.h"
#include "ext/standard/file.h"