]> granicus.if.org Git - php/commitdiff
Fix [-Wundef] warning in FTP extension
authorGeorge Peter Banyard <girgias@php.net>
Tue, 12 May 2020 16:02:35 +0000 (18:02 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Sat, 16 May 2020 13:31:17 +0000 (15:31 +0200)
ext/ftp/ftp.c
ext/ftp/php_ftp.c
ext/ftp/php_ftp.h

index 71dc7f66917cfdf22ddfa890b324910298e49042..f47e0a6d4907ef7c69086c4c92421a284712fd21 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "php.h"
 
-#if HAVE_FTP
+#ifdef HAVE_FTP
 
 #include <stdio.h>
 #include <ctype.h>
@@ -45,7 +45,7 @@
 #endif
 #include <errno.h>
 
-#if HAVE_SYS_TIME_H
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
 
@@ -816,7 +816,7 @@ ftp_pasv(ftpbuf_t *ftp, int pasv)
                return 0;
        }
 
-#if HAVE_IPV6
+#ifdef HAVE_IPV6
        if (sa->sa_family == AF_INET6) {
                struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa;
                char *endptr, delimiter;
@@ -1719,7 +1719,7 @@ ftp_getdata(ftpbuf_t *ftp)
 
        data->listener = fd;
 
-#if HAVE_IPV6 && HAVE_INET_NTOP
+#if defined(HAVE_IPV6) && defined(HAVE_INET_NTOP)
        if (sa->sa_family == AF_INET6) {
                /* need to use EPRT */
                char eprtarg[INET6_ADDRSTRLEN + sizeof("|x||xxxxx|")];
index f4030038f17f9db7341418a73c15b01191b50dc6..a5e5f50485882ca6da383bb4eb4753b3d54b0782 100644 (file)
@@ -25,7 +25,7 @@
 # include <openssl/ssl.h>
 #endif
 
-#if HAVE_FTP
+#ifdef HAVE_FTP
 
 #include "ext/standard/info.h"
 #include "ext/standard/file.h"
@@ -52,7 +52,7 @@ zend_module_entry php_ftp_module_entry = {
        STANDARD_MODULE_PROPERTIES
 };
 
-#if COMPILE_DL_FTP
+#ifdef COMPILE_DL_FTP
 ZEND_GET_MODULE(php_ftp)
 #endif
 
index 4d18721284be581ff295b8d0516a38266b22a532..60eba04adfd8c7173bb83908f99334be949dbdb5 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef        _INCLUDED_FTP_H
 #define        _INCLUDED_FTP_H
 
-#if HAVE_FTP
+#ifdef HAVE_FTP
 
 extern zend_module_entry php_ftp_module_entry;
 #define php_ftp_module_ptr &php_ftp_module_entry