summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorNeil Brown <neilb@notabene.(none)>2006-04-17 16:54:54 +1000
committerNeil Brown <neilb@notabene.(none)>2006-04-17 16:54:54 +1000
commitc481a5416e5b937541205da23cde15cdabf106c1 (patch)
treecd7b48cacec1f8145cfd7af09dbf2eb206dc098d /utils
parent0270a2498325b70be4c1ac91bb64c4f29607b57f (diff)
downloadnfs-utils-c481a5416e5b937541205da23cde15cdabf106c1.tar.gz
nfs-utils-c481a5416e5b937541205da23cde15cdabf106c1.tar.xz
nfs-utils-c481a5416e5b937541205da23cde15cdabf106c1.zip
Define and use HIAVE_IFADDRS_H
Diffstat (limited to 'utils')
-rw-r--r--utils/statd/rmtcall.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c
index 809d1ad..7684b3b 100644
--- a/utils/statd/rmtcall.c
+++ b/utils/statd/rmtcall.c
@@ -37,7 +37,9 @@
#include <netdb.h>
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_IFADDRS_H
#include <ifaddrs.h>
+#endif /* HAVE_IFADDRS_H */
#include "sm_inter.h"
#include "statd.h"
#include "notlist.h"
@@ -94,6 +96,8 @@ statd_get_socket(int port)
out_success:
return sockfd;
}
+
+#ifdef HAVE_IFADDRS_H
/*
* Using the NL_ADDR(lp), reset (if needed) the hostname
* that will be put in the SM_NOTIFY to the hostname
@@ -138,6 +142,7 @@ reset_my_name(notify_list *lp)
}
return;
}
+#endif /* HAVE_IFADDRS_H */
/*
* Try to resolve host name for notify/callback request
*
@@ -379,9 +384,10 @@ process_entry(int sockfd, notify_list *lp)
* set the NL_MY_NAME(lp) hostname to the
* one associated with the network interface
*/
+#ifdef HAVE_IFADDRS_H
if (!(run_mode & STATIC_HOSTNAME))
reset_my_name(lp);
-
+#endif /* HAVE_IFADDRS_H */
func = (xdrproc_t) xdr_stat_chge;
new_stat.state = MY_STATE;
new_stat.mon_name = NL_MY_NAME(lp);