ZDR: remove dependency on zdr.h from the examples and nfs-ls
[deb_libnfs.git] / examples / nfsclient-async.c
index c5d0df1d523069c61ec28d3668c234f066e4ba48..739f220ea5a9225b7100eeb189b16956e7a2ec5e 100644 (file)
 
 /* Example program using the highlevel async interface.
  */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifdef WIN32
 #include "win32_compat.h"
 #else
 #include <sys/stat.h>
-#include <fcntl.h>
-#include <poll.h>
 #endif
  
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 #define SERVER "10.1.1.27"
 #define EXPORT "/VIRTUAL"
 #define NFSFILE "/BOOKS/Classics/Dracula.djvu"
@@ -34,7 +44,7 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <sys/types.h>
-#include <unistd.h>
+#include <fcntl.h>
 #include "libnfs.h"
 #include "libnfs-raw.h"
 #include "libnfs-raw-mount.h"