Skip to content

Commit fcfe0ac

Browse files
committed
[W.I.P] Fix [-Wundef] warning in SNMP extension
1 parent 8862dd3 commit fcfe0ac

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/snmp/php_snmp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#define PHP_SNMP_VERSION PHP_VERSION
2626

27-
#if HAVE_SNMP
27+
#ifdef HAVE_SNMP
2828

2929
#ifndef DLEXPORT
3030
#define DLEXPORT

ext/snmp/snmp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include "ext/spl/spl_exceptions.h"
3333
#include "snmp_arginfo.h"
3434

35-
#if HAVE_SNMP
35+
#ifdef HAVE_SNMP
3636

3737
#include <sys/types.h>
3838
#include <errno.h>
@@ -854,7 +854,7 @@ static int netsnmp_session_init(php_snmp_session **session_p, int version, char
854854
res = psal;
855855
while (n-- > 0) {
856856
pptr = session->peername;
857-
#if HAVE_GETADDRINFO && HAVE_IPV6 && HAVE_INET_NTOP
857+
#if defined(HAVE_GETADDRINFO) && defined(HAVE_IPV6) && defined(HAVE_INET_NTOP)
858858
if (force_ipv6 && (*res)->sa_family != AF_INET6) {
859859
res++;
860860
continue;

0 commit comments

Comments
 (0)