X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Fnfsclient-sync.c;h=9ca58b467c8461f97c9043d1fcc120d2edd0416c;hb=17d3cbb13656f98b4b88bdaf15baaf4ca1b5b4ac;hp=70bd77a1757c18dca5cd536871afc7a8380f1bf5;hpb=00748f36c57324ccc2cb21ac9af45d15821cf675;p=deb_libnfs.git diff --git a/examples/nfsclient-sync.c b/examples/nfsclient-sync.c index 70bd77a..9ca58b4 100644 --- a/examples/nfsclient-sync.c +++ b/examples/nfsclient-sync.c @@ -24,11 +24,17 @@ #include "config.h" #endif +#ifdef AROS +#include "aros_compat.h" +#endif + #ifdef WIN32 #include "win32_compat.h" #pragma comment(lib, "ws2_32.lib") WSADATA wsaData; +#define PRId64 "ll" #else +#include #include #include #ifndef AROS @@ -40,14 +46,9 @@ WSADATA wsaData; #include #endif -#ifdef AROS -#include "aros_compat.h" -#endif - #include #include #include -#include #include #include #include @@ -172,7 +173,7 @@ int main(int argc, char *argv[]) continue; } - snprintf(path, 1024, "%s/%s", "/", nfsdirent->name); + sprintf(path, "%s/%s", "/", nfsdirent->name); ret = nfs_stat(nfs, path, &st); if (ret != 0) { fprintf(stderr, "Failed to stat(%s) %s\n", path, nfs_get_error(nfs)); @@ -180,7 +181,9 @@ int main(int argc, char *argv[]) } switch (st.st_mode & S_IFMT) { +#ifndef WIN32 case S_IFLNK: +#endif case S_IFREG: printf("-"); break;