[PATCH v2 06/10] fstree: replace lstat with stat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 fstree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)) {
-- 
2.23.0




[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux