On Wed, Oct 09, 2019 at 10:43:37AM +0400, Marc-André Lureau wrote: > Hi > > On Wed, Oct 9, 2019 at 8:03 AM David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> wrote: > > > > On Mon, Oct 07, 2019 at 11:18:02PM +0400, marcandre.lureau@xxxxxxxxxx wrote: > > > From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> > > > > > > Fixes mingw cross-compilation. > > > > > > It seems to me that stat() is the right function there, to return > > > informations about the file it refers to. > > > > That sounds plausible. However if would be good if you can connect > > the dots a bit more as to why this breaks mingw compilation. > > lstat() doesn't exist on win32. Ok, fold that info into the commit message, please. > > > > > > > > > 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)) { > > > -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Attachment:
signature.asc
Description: PGP signature