From 9a96dd46d2e03d5ae3c30ef89886c31ef83ad34a Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 10 Jul 2011 08:50:36 +1000 Subject: [PATCH] We have to include config.h when testing for precense of sockaddr sa_len --- examples/nfsclient-bcast.c | 3 ++- lib/libnfs-sync.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 { -- 2.34.1