From 96c028b213f14921bad01b05c0df5fceb5e5a743 Mon Sep 17 00:00:00 2001
From: Carmelo Amoroso <carmelo.amoroso@st.com>
Date: Tue, 9 Sep 2008 12:04:00 +0000
Subject: Revert latest changes. Instead of applying this work-around a proper
 fix should ensure that statically linked mutli-threaded binaries take always
 the proper locking implementation.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
---
 libc/misc/dirent/opendir.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libc/misc/dirent/opendir.c b/libc/misc/dirent/opendir.c
index cfc699be0..26ab91511 100644
--- a/libc/misc/dirent/opendir.c
+++ b/libc/misc/dirent/opendir.c
@@ -64,9 +64,8 @@ close_and_ret:
 	if (!(ptr = malloc(sizeof(*ptr))))
 		goto nomem_close_and_ret;
 
-	memset(ptr, '\0', sizeof(DIR));
 	ptr->dd_fd = fd;
-
+	ptr->dd_nextloc = ptr->dd_size = ptr->dd_nextoff = 0;
 	ptr->dd_max = statbuf.st_blksize;
 	if (ptr->dd_max < 512)
 		ptr->dd_max = 512;
-- 
cgit v1.2.3