From: Chris Patterson <patters...@ainfosec.com>

Replace the usage of readdir_r() with readdir() to address
a compilation error due to the deprecation of readdir_r.

glibc has deprecated this for their next release (2.24):
https://sourceware.org/bugzilla/show_bug.cgi?id=19056

Signed-off-by: Chris Patterson <patters...@ainfosec.com>
---
 tools/libfsimage/common/fsimage_plugin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libfsimage/common/fsimage_plugin.c 
b/tools/libfsimage/common/fsimage_plugin.c
index 3fa06c7..03212e1 100644
--- a/tools/libfsimage/common/fsimage_plugin.c
+++ b/tools/libfsimage/common/fsimage_plugin.c
@@ -147,7 +147,7 @@ static int load_plugins(void)
 
        bzero(dp, sizeof (struct dirent) + name_max + 1);
 
-       while (readdir_r(dir, dp, &dpp) == 0 && dpp != NULL) {
+       while ((dpp = readdir(dir)) != NULL) {
                if (strcmp(dpp->d_name, ".") == 0)
                        continue;
                if (strcmp(dpp->d_name, "..") == 0)
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to