fstree: replace lstat with stat
Fixes mingw cross-compilation. lstat() doesn't exist on win32. It seems to me that stat() is the right function there, to return informations about the file it refers to. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20191009102025.10179-7-marcandre.lureau@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
4c3c4ccb99
commit
bc876708ab
1 changed files with 1 additions and 1 deletions
2
fstree.c
2
fstree.c
|
@ -30,7 +30,7 @@ static struct node *read_fstree(const char *dirname)
|
||||||
|
|
||||||
tmpname = join_path(dirname, de->d_name);
|
tmpname = join_path(dirname, de->d_name);
|
||||||
|
|
||||||
if (lstat(tmpname, &st) < 0)
|
if (stat(tmpname, &st) < 0)
|
||||||
die("stat(%s): %s\n", tmpname, strerror(errno));
|
die("stat(%s): %s\n", tmpname, strerror(errno));
|
||||||
|
|
||||||
if (S_ISREG(st.st_mode)) {
|
if (S_ISREG(st.st_mode)) {
|
||||||
|
|
Loading…
Reference in a new issue