naccyde / rpms / systemd

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