public inbox for
help / color / mirror / Atom feed
From: Sebastian Huber <>
Subject: [newlib-cygwin] scandir: Add support for struct dirent::d_type
Date: Fri, 01 Feb 2019 09:40:00 -0000	[thread overview]
Message-ID: <> (raw);h=3e24fbf6f0e4915efbbd98702e4801bcf9ebf89a

commit 3e24fbf6f0e4915efbbd98702e4801bcf9ebf89a
Author: Sebastian Huber <>
Date:   Thu Jan 31 11:48:12 2019 +0100

    scandir: Add support for struct dirent::d_type
    Signed-off-by: Sebastian Huber <>

 newlib/libc/posix/scandir.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/newlib/libc/posix/scandir.c b/newlib/libc/posix/scandir.c
index c39d9a4..7fd0089 100644
--- a/newlib/libc/posix/scandir.c
+++ b/newlib/libc/posix/scandir.c
@@ -33,7 +33,7 @@
 #include <sys/cdefs.h>
 __SCCSID("@(#)scandir.c	8.3 (Berkeley) 1/2/94");
+__FBSDID("$FreeBSD: head/lib/libc/gen/scandir.c 335898 2018-07-03 17:31:45Z jhb $");
  * Scan the directory dirname calling select to make a list of selected
@@ -95,6 +95,9 @@ scandir(const char *dirname, struct dirent ***namelist,
 		if (p == NULL)
 			goto fail;
 		p->d_ino = d->d_ino;
+#ifdef DT_UNKNOWN
+		p->d_type = d->d_type;
 		p->d_reclen = d->d_reclen;
 		p->d_namlen = d->d_namlen;

                 reply	other threads:[~2019-02-01  9:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).