summaryrefslogtreecommitdiff
path: root/src/sp_network_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp_network_utils.c')
-rw-r--r--src/sp_network_utils.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/sp_network_utils.c b/src/sp_network_utils.c
index c444c1e..1811d98 100644
--- a/src/sp_network_utils.c
+++ b/src/sp_network_utils.c
@@ -1,7 +1,5 @@
1#include "php_snuffleupagus.h" 1#include "php_snuffleupagus.h"
2 2
3ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus)
4
5static inline bool cidr4_match(const struct in_addr addr, 3static inline bool cidr4_match(const struct in_addr addr,
6 const struct in_addr net, uint8_t bits); 4 const struct in_addr net, uint8_t bits);
7static inline bool cidr6_match(const struct in6_addr address, 5static inline bool cidr6_match(const struct in6_addr address,
@@ -19,7 +17,7 @@ static inline bool cidr4_match(const struct in_addr addr,
19 17
20static inline bool cidr6_match(const struct in6_addr address, 18static inline bool cidr6_match(const struct in6_addr address,
21 const struct in6_addr network, uint8_t bits) { 19 const struct in6_addr network, uint8_t bits) {
22#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) 20#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
23 const uint32_t *a = address.__u6_addr.__u6_addr32; 21 const uint32_t *a = address.__u6_addr.__u6_addr32;
24 const uint32_t *n = network.__u6_addr.__u6_addr32; 22 const uint32_t *n = network.__u6_addr.__u6_addr32;
25#else 23#else