summaryrefslogtreecommitdiffstats
path: root/src/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dir.c')
-rw-r--r--src/dir.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dir.c b/src/dir.c
index 83e8a66..be2c44e 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -7,6 +7,7 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
+#include <stdalign.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
@@ -105,9 +106,10 @@ enum bfs_type bfs_mode_to_type(mode_t mode) {
struct bfs_dir {
#if BFS_GETDENTS
- int fd;
+ alignas(sys_dirent) int fd;
unsigned short pos;
unsigned short size;
+ // sys_dirent buf[];
#else
DIR *dir;
struct dirent *de;