Skip to content

Commit 044e9ab

Browse files
committed
Fix [-Wundef] warning in FTP extension
1 parent dcdc177 commit 044e9ab

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

ext/ftp/ftp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#include "php.h"
2323

24-
#if HAVE_FTP
24+
#ifdef HAVE_FTP
2525

2626
#include <stdio.h>
2727
#include <ctype.h>
@@ -45,7 +45,7 @@
4545
#endif
4646
#include <errno.h>
4747

48-
#if HAVE_SYS_TIME_H
48+
#ifdef HAVE_SYS_TIME_H
4949
#include <sys/time.h>
5050
#endif
5151

@@ -816,7 +816,7 @@ ftp_pasv(ftpbuf_t *ftp, int pasv)
816816
return 0;
817817
}
818818

819-
#if HAVE_IPV6
819+
#ifdef HAVE_IPV6
820820
if (sa->sa_family == AF_INET6) {
821821
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa;
822822
char *endptr, delimiter;
@@ -1719,7 +1719,7 @@ ftp_getdata(ftpbuf_t *ftp)
17191719

17201720
data->listener = fd;
17211721

1722-
#if HAVE_IPV6 && HAVE_INET_NTOP
1722+
#if defined(HAVE_IPV6) && defined(HAVE_INET_NTOP)
17231723
if (sa->sa_family == AF_INET6) {
17241724
/* need to use EPRT */
17251725
char eprtarg[INET6_ADDRSTRLEN + sizeof("|x||xxxxx|")];

ext/ftp/php_ftp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# include <openssl/ssl.h>
2626
#endif
2727

28-
#if HAVE_FTP
28+
#ifdef HAVE_FTP
2929

3030
#include "ext/standard/info.h"
3131
#include "ext/standard/file.h"
@@ -52,7 +52,7 @@ zend_module_entry php_ftp_module_entry = {
5252
STANDARD_MODULE_PROPERTIES
5353
};
5454

55-
#if COMPILE_DL_FTP
55+
#ifdef COMPILE_DL_FTP
5656
ZEND_GET_MODULE(php_ftp)
5757
#endif
5858

ext/ftp/php_ftp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#ifndef _INCLUDED_FTP_H
1919
#define _INCLUDED_FTP_H
2020

21-
#if HAVE_FTP
21+
#ifdef HAVE_FTP
2222

2323
extern zend_module_entry php_ftp_module_entry;
2424
#define php_ftp_module_ptr &php_ftp_module_entry

0 commit comments

Comments
 (0)