daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
572a44
From 095e14ab14e22d4fa605411bb0f47a856c90df8b Mon Sep 17 00:00:00 2001
572a44
From: Florian Weimer <fweimer@redhat.com>
572a44
Date: Thu, 19 Dec 2013 11:16:12 +0100
572a44
Subject: [PATCH] delta: replace readdir_r with readdir
572a44
572a44
---
572a44
 src/delta/delta.c | 8 ++++----
572a44
 1 file changed, 4 insertions(+), 4 deletions(-)
572a44
572a44
diff --git a/src/delta/delta.c b/src/delta/delta.c
572a44
index 193642d..c2550d6 100644
572a44
--- a/src/delta/delta.c
572a44
+++ b/src/delta/delta.c
572a44
@@ -280,13 +280,13 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, Hashmap *drops, const ch
572a44
 
572a44
         for (;;) {
572a44
                 struct dirent *de;
572a44
-                union dirent_storage buf;
572a44
                 int k;
572a44
                 char *p;
572a44
 
572a44
-                k = readdir_r(d, &buf.de, &de);
572a44
-                if (k != 0)
572a44
-                        return -k;
572a44
+                errno = 0;
572a44
+                de = readdir(d);
572a44
+                if (!de && errno != 0)
572a44
+                        return -errno;
572a44
 
572a44
                 if (!de)
572a44
                         break;