diff options
author | Claudio Fontana <sick_soul@users.sourceforge.net> | 2006-07-22 03:13:53 +0000 |
---|---|---|
committer | Claudio Fontana <sick_soul@users.sourceforge.net> | 2006-07-22 03:13:53 +0000 |
commit | c3a4372e8c93925442c67d2ff0dd645b9760ea40 (patch) | |
tree | 8d16389dc8bc7863b0a63a6fec1ee89b5a2e68a0 /libidu/walker.c | |
parent | d2877acc14917f127c982a3c176dcd3eb3dabb4f (diff) | |
download | idutils-c3a4372e8c93925442c67d2ff0dd645b9760ea40.tar.gz idutils-c3a4372e8c93925442c67d2ff0dd645b9760ea40.tar.bz2 idutils-c3a4372e8c93925442c67d2ff0dd645b9760ea40.zip |
* provide replacement for lstat in a convoluted way,
to workaround AC_REPLACE_FUNC / gnulib shortcomings
Diffstat (limited to 'libidu/walker.c')
-rw-r--r-- | libidu/walker.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libidu/walker.c b/libidu/walker.c index 914905b..eeaf81f 100644 --- a/libidu/walker.c +++ b/libidu/walker.c @@ -18,7 +18,7 @@ */ #include <config.h> -#include <sys/stat.h> +#include "lstat.h" #include <stdio.h> #include <stdlib.h> #include <stddef.h> @@ -73,6 +73,14 @@ unsigned long dev_ino_hash_2 (void const *key); int dev_ino_hash_compare (void const *x, void const *y); int symlink_ancestry (struct file_link *flink); +#ifndef HAVE_LSTAT +#undef lstat +int lstat(const char *filename, struct stat *sbuf) +{ + return stat(filename, sbuf); +} +#endif + #if HAVE_LINK struct file_link *find_alias_link (struct file_link *flink, struct stat *stp); |