libchrome: Remove usage of readdir_r()

readdir_r() is deprecated, which causes build failures when using
glibc-2.24 or newer headers.  This CL replaces usage of readdir_r()
with readdir(). Part of it is a cherry-pick of

TEST=emerge-samus libchrome with glibc 2.27

Change-Id: If530eeb5faf7748b59fdd7a367a03ff02eaa95a1
Commit-Ready: Yunlian Jiang <>
Tested-by: Yunlian Jiang <>
Reviewed-by: Manoj Gupta <>
Reviewed-by: Jorge Lucangeli Obes <>
2 files changed