chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66c7a53
)
core: replace readdir_r with readdir
author
Florian Weimer
<fweimer@redhat.com>
Thu, 19 Dec 2013 10:25:08 +0000
(11:25 +0100)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Sat, 21 Dec 2013 23:35:55 +0000
(18:35 -0500)
src/core/load-dropin.c
patch
|
blob
|
history
diff --git
a/src/core/load-dropin.c
b/src/core/load-dropin.c
index a877e66098ae91c1ce885da80f198ebca0878879..35040090ac3bbe186d2d295b7b4630e76d3dc040 100644
(file)
--- a/
src/core/load-dropin.c
+++ b/
src/core/load-dropin.c
@@
-63,12
+63,13
@@
static int iterate_dir(
for (;;) {
struct dirent *de;
- union dirent_storage buf;
_cleanup_free_ char *f = NULL;
int k;
- k = readdir_r(d, &buf.de, &de);
- if (k != 0) {
+ errno = 0;
+ de = readdir(d);
+ if (!de && errno != 0) {
+ k = errno;
log_error("Failed to read directory %s: %s", path, strerror(k));
return -k;
}