From b63a70808255266a60062b9f7a392b596bf76b79 Mon Sep 17 00:00:00 2001 From: Brett Gordon Date: Sat, 5 Mar 2016 09:55:08 -0500 Subject: [PATCH] opendir_r: bugfix: bad first iteration of readdir --- Library/libs/opendir_r.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library/libs/opendir_r.c b/Library/libs/opendir_r.c index 9fe3d9ae..c32ffdef 100644 --- a/Library/libs/opendir_r.c +++ b/Library/libs/opendir_r.c @@ -20,5 +20,7 @@ DIR *opendir_r(DIR *dir, char *path) if ((dir->dd_fd = open(path, O_RDONLY | O_CLOEXEC)) < 0) return NULL; dir->dd_loc = 0; + dir->_priv.next = 0; + dir->_priv.last = 0; return dir; } -- 2.34.1