From bc876708ab1dbb41f3890fa801b69e9ca01cefa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 9 Oct 2019 14:20:21 +0400 Subject: fstree: replace lstat with stat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Message-Id: <20191009102025.10179-7-marcandre.lureau@redhat.com> Signed-off-by: David Gibson --- fstree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fstree.c') diff --git a/fstree.c b/fstree.c index 9871689..5e59594 100644 --- a/fstree.c +++ b/fstree.c @@ -30,7 +30,7 @@ static struct node *read_fstree(const char *dirname) 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)); if (S_ISREG(st.st_mode)) { -- cgit v1.2.1