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