X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Fnfs-ls.c;h=e0131c8b745d719daaa34f7ca8e62103eca9463c;hb=67a9f57e67c3b2c147969c752532fd55eb99259c;hp=c4b9fa938f68aec8476f3433229f2b96f321415f;hpb=e083c2a0900ae13191b62a30db34fc5b57ce621b;p=deb_libnfs.git diff --git a/examples/nfs-ls.c b/examples/nfs-ls.c index c4b9fa9..e0131c8 100644 --- a/examples/nfs-ls.c +++ b/examples/nfs-ls.c @@ -30,7 +30,9 @@ #include "win32_compat.h" #pragma comment(lib, "ws2_32.lib") WSADATA wsaData; +#define PRId64 "ll" #else +#include #include #include #ifndef AROS @@ -45,7 +47,6 @@ WSADATA wsaData; #include #include #include -#include #include #include #include @@ -167,7 +168,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)); @@ -175,7 +176,9 @@ int main(int argc, char *argv[]) } switch (st.st_mode & S_IFMT) { +#ifndef WIN32 case S_IFLNK: +#endif case S_IFREG: printf("-"); break;