Skip to content

Commit 1ab5af9

Browse files
committed
[W.I.P] Fix [-Wundef] warning in SNMP extension
1 parent c2e7b6d commit 1ab5af9

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>
@@ -868,7 +868,7 @@ static int netsnmp_session_init(php_snmp_session **session_p, int version, char
868868
res = psal;
869869
while (n-- > 0) {
870870
pptr = session->peername;
871-
#if HAVE_GETADDRINFO && HAVE_IPV6 && HAVE_INET_NTOP
871+
#if defined(HAVE_GETADDRINFO) && defined(HAVE_IPV6) && defined(HAVE_INET_NTOP)
872872
if (force_ipv6 && (*res)->sa_family != AF_INET6) {
873873
res++;
874874
continue;

0 commit comments

Comments
 (0)