summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/du.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/du.c b/src/du.c
index b5c525810..a4648be67 100644
--- a/src/du.c
+++ b/src/du.c
@@ -96,6 +96,15 @@ typedef struct String String;
int stat ();
int lstat ();
+/* Arrange to make lstat calls go through the wrapper function
+ on systems with an lstat function that does not dereference symlinks
+ that are specified with a trailing slash. */
+#if ! LSTAT_FOLLOWS_SLASHED_SYMLINK
+int rpl_lstat (char const *, struct stat *);
+# undef lstat
+# define lstat rpl_lstat
+#endif
+
/* Name under which this program was invoked. */
char *program_name;