chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
basic: fallback to fstatat if entry->d_type is DT_UNKNOWN
[elogind.git]
/
src
/
basic
/
locale-util.c
diff --git
a/src/basic/locale-util.c
b/src/basic/locale-util.c
index b87fd7670bf410a58aa1bff5a2805821e37e1026..eaad25e65bf92c143b332cb11d048480e8804e69 100644
(file)
--- a/
src/basic/locale-util.c
+++ b/
src/basic/locale-util.c
@@
-1,5
+1,3
@@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
/***
This file is part of systemd.
/***
This file is part of systemd.
@@
-19,12
+17,22
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
#include <langinfo.h>
#include <langinfo.h>
+#include <libintl.h>
#include <locale.h>
#include <locale.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/mman.h>
#include <sys/mman.h>
+#include <sys/stat.h>
#include "dirent-util.h"
#include "fd-util.h"
#include "dirent-util.h"
#include "fd-util.h"
+#include "hashmap.h"
#include "locale-util.h"
#include "path-util.h"
#include "set.h"
#include "locale-util.h"
#include "path-util.h"
#include "set.h"
@@
-32,7
+40,6
@@
#include "string-util.h"
#include "strv.h"
#include "utf8.h"
#include "string-util.h"
#include "strv.h"
#include "utf8.h"
-#include "util.h"
static int add_locales_from_archive(Set *locales) {
/* Stolen from glibc... */
static int add_locales_from_archive(Set *locales) {
/* Stolen from glibc... */
@@
-146,6
+153,8
@@
static int add_locales_from_libdir (Set *locales) {
FOREACH_DIRENT(entry, dir, return -errno) {
char *z;
FOREACH_DIRENT(entry, dir, return -errno) {
char *z;
+ dirent_ensure_type(dir, entry);
+
if (entry->d_type != DT_DIR)
continue;
if (entry->d_type != DT_DIR)
continue;