summaryrefslogtreecommitdiff
path: root/src/shared/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/util.h')
-rw-r--r--src/shared/util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/shared/util.h b/src/shared/util.h
index 2429339f5b..e5728bd87e 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -35,6 +35,7 @@
#include <sys/stat.h>
#include <dirent.h>
#include <sys/resource.h>
+#include <stddef.h>
#include "macro.h"
@@ -46,6 +47,12 @@ typedef struct dual_timestamp {
usec_t monotonic;
} dual_timestamp;
+union dirent_storage {
+ struct dirent de;
+ uint8_t storage[offsetof(struct dirent, d_name) +
+ ((NAME_MAX + 1 + sizeof(long)) & ~(sizeof(long) - 1))];
+};
+
#define MSEC_PER_SEC 1000ULL
#define USEC_PER_SEC 1000000ULL
#define USEC_PER_MSEC 1000ULL