All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] libfsimage: replace deprecated readdir_r() with readdir()
@ 2016-05-30  2:32 Chris Patterson
  2016-05-30  2:32 ` [PATCH 2/2] libxl: " Chris Patterson
  2016-05-31 10:42 ` [PATCH 1/2] libfsimage: " George Dunlap
  0 siblings, 2 replies; 10+ messages in thread
From: Chris Patterson @ 2016-05-30  2:32 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, Chris Patterson, ian.jackson

From: Chris Patterson <pattersonc@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 <pattersonc@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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-06-01 13:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-30  2:32 [PATCH 1/2] libfsimage: replace deprecated readdir_r() with readdir() Chris Patterson
2016-05-30  2:32 ` [PATCH 2/2] libxl: " Chris Patterson
2016-05-31 10:42 ` [PATCH 1/2] libfsimage: " George Dunlap
2016-05-31 15:43   ` Chris Patterson
2016-05-31 17:53     ` Wei Liu
2016-05-31 20:37       ` Chris Patterson
2016-06-01 11:06         ` Ian Jackson
2016-06-01 12:04           ` Ian Jackson
2016-06-01 12:06             ` Ian Jackson
2016-06-01 13:55               ` Chris Patterson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.