Don't call do_lstat() unless SUPPORT_LINKS is defined.
authorWayne Davison <wayned@samba.org>
Mon, 13 Dec 2004 17:22:32 +0000 (17:22 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 13 Dec 2004 17:22:32 +0000 (17:22 +0000)
tls.c

diff --git a/tls.c b/tls.c
index 89b6445..80d20c8 100644 (file)
--- a/tls.c
+++ b/tls.c
@@ -65,8 +65,14 @@ static void list_file(const char *fname)
        struct tm *mt;
        char datebuf[50];
        char linkbuf[4096];
-
-       if (do_lstat(fname, &buf) == -1)
+       int ret;
+
+#if SUPPORT_LINKS
+       ret = do_lstat(fname, &buf);
+#else
+       ret = do_stat(fname, &buf);
+#endif
+       if (ret < 0)
                failed("stat", fname);
 
        /* The size of anything but a regular file is probably not