Skip to content

Commit 62ab929

Browse files
committed
Fix [-Wundef] warnings in SNMP extension
1 parent 2c2ecba commit 62ab929

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
@@ -33,7 +33,7 @@
3333
#include "ext/spl/spl_exceptions.h"
3434
#include "snmp_arginfo.h"
3535

36-
#if HAVE_SNMP
36+
#ifdef HAVE_SNMP
3737

3838
#include <sys/types.h>
3939
#include <errno.h>
@@ -865,7 +865,7 @@ static bool netsnmp_session_init(php_snmp_session **session_p, int version, zend
865865
res = psal;
866866
while (n-- > 0) {
867867
pptr = session->peername;
868-
#if HAVE_GETADDRINFO && HAVE_IPV6 && HAVE_INET_NTOP
868+
#if defined(HAVE_GETADDRINFO) && defined(HAVE_IPV6) && defined(HAVE_INET_NTOP)
869869
if (force_ipv6 && (*res)->sa_family != AF_INET6) {
870870
res++;
871871
continue;

0 commit comments

Comments
 (0)