X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=utils%2Fstatd%2Fsm-notify.c;h=1f490b0e6b7832baadf963f10c5839c846f4e1e9;hb=7b00283f5a6f8b1d3d1acece1da6df1c30cb6279;hp=437e37a6b49de679f72b9663324faad4b346723d;hpb=baa41b2c78e796540c45692ea35214f7090a78cb;p=nfs-utils.git diff --git a/utils/statd/sm-notify.c b/utils/statd/sm-notify.c index 437e37a..1f490b0 100644 --- a/utils/statd/sm-notify.c +++ b/utils/statd/sm-notify.c @@ -34,8 +34,9 @@ #include "nsm.h" #include "nfsrpc.h" -#ifndef HAVE_DECL_AI_ADDRCONFIG -#define AI_ADDRCONFIG 0 +/* glibc before 2.3.4 */ +#ifndef AI_NUMERICSERV +#define AI_NUMERICSERV 0 #endif #define NSM_TIMEOUT 2 @@ -78,7 +79,6 @@ smn_lookup(const char *name) { struct addrinfo *ai = NULL; struct addrinfo hint = { - .ai_flags = AI_ADDRCONFIG, .ai_family = (nsm_family == AF_INET ? AF_INET: AF_UNSPEC), .ai_protocol = (int)IPPROTO_UDP, }; @@ -253,6 +253,7 @@ smn_bind_address(const char *srcaddr, const char *srcport) if (srcaddr == NULL) hint.ai_flags |= AI_PASSIVE; + /* Do not allow "node" and "service" parameters both to be NULL */ if (srcport == NULL) error = getaddrinfo(srcaddr, "", &hint, &ai); else