From: Ronnie Sahlberg Date: Sat, 9 Jul 2011 22:50:36 +0000 (+1000) Subject: We have to include config.h when testing for precense of sockaddr sa_len X-Git-Tag: upstream/1.9.6^2~348 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9a96dd46d2e03d5ae3c30ef89886c31ef83ad34a;p=deb_libnfs.git We have to include config.h when testing for precense of sockaddr sa_len --- diff --git a/examples/nfsclient-bcast.c b/examples/nfsclient-bcast.c index 89434d5..89b1376 100644 --- a/examples/nfsclient-bcast.c +++ b/examples/nfsclient-bcast.c @@ -18,6 +18,7 @@ /* Example program using the lowlevel raw broadcast interface. */ +#include "config.h" #include #include #include @@ -145,7 +146,7 @@ int main(int argc _U_, char *argv[] _U_) char bcdd[16]; ifr = (struct ifreq *)ptr; -#if HAVE_SOCKADDR_LEN +#ifdef HAVE_SOCKADDR_LEN if (ifr->ifr_addr.sa_len > sizeof(struct sockaddr)) { ptr += sizeof(ifr->ifr_name) + ifr->ifr_addr.sa_len; } else { diff --git a/lib/libnfs-sync.c b/lib/libnfs-sync.c index 82c09f3..faf8545 100644 --- a/lib/libnfs-sync.c +++ b/lib/libnfs-sync.c @@ -18,6 +18,7 @@ * High level api to nfs filesystems */ +#include "config.h" #include #include #include @@ -1245,7 +1246,7 @@ struct nfs_server_list *nfs_find_local_servers(void) char bcdd[16]; ifr = (struct ifreq *)ptr; -#if HAVE_SOCKADDR_LEN +#ifdef HAVE_SOCKADDR_LEN if (ifr->ifr_addr.sa_len > sizeof(struct sockaddr)) { ptr += sizeof(ifr->ifr_name) + ifr->ifr_addr.sa_len; } else {