We have to include config.h when testing for precense of sockaddr sa_len
[deb_libnfs.git] / examples / nfsclient-bcast.c
index 89434d5561bc303699f0bbb7b9f05e93a74d664d..89b1376aae9c9dcb1026202e732c680133ad42b3 100644 (file)
@@ -18,6 +18,7 @@
 /* Example program using the lowlevel raw broadcast interface.
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -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 {