summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c596055)
raw | patch | inline | side by side (parent: c596055)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Tue, 2 Aug 2016 13:19:49 +0000 (15:19 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Tue, 2 Aug 2016 13:19:49 +0000 (15:19 +0200) |
I think it's safe to assume that if you have getaddrinfo, you have
AI_PASSIVE. My copy of Stevens from 1998 already describes it.
AI_PASSIVE. My copy of Stevens from 1998 already describes it.
src/gmond.c | patch | blob | history | |
src/network.c | patch | blob | history |
diff --git a/src/gmond.c b/src/gmond.c
index b6971b1a685be1625a1b0b508d9a9c535356867e..9dda84c91c784c1337be99c0da983ff646070ac9 100644 (file)
--- a/src/gmond.c
+++ b/src/gmond.c
if (*ret_sockets != NULL)
return (EINVAL);
- ai_hints.ai_flags = AI_ADDRCONFIG;
-#ifdef AI_PASSIVE
- ai_hints.ai_flags |= AI_PASSIVE;
-#endif
+ ai_hints.ai_flags = AI_ADDRCONFIG | AI_PASSIVE;
ai_hints.ai_family = AF_UNSPEC;
ai_hints.ai_socktype = SOCK_DGRAM;
ai_hints.ai_protocol = IPPROTO_UDP;
diff --git a/src/network.c b/src/network.c
index 4f13aa4ade8a5f7824f00c0da644764d5ed5bac8..baeb9159dd829c342f70a2395926a000f9073a14 100644 (file)
--- a/src/network.c
+++ b/src/network.c
DEBUG ("network plugin: sockent_server_listen: node = %s; service = %s;",
node, service);
- ai_hints.ai_flags = AI_ADDRCONFIG;
-#ifdef AI_PASSIVE
- ai_hints.ai_flags |= AI_PASSIVE;
-#endif
+ ai_hints.ai_flags = AI_ADDRCONFIG | AI_PASSIVE;
ai_hints.ai_family = AF_UNSPEC;
ai_hints.ai_socktype = SOCK_DGRAM;
ai_hints.ai_protocol = IPPROTO_UDP;