diff options
Diffstat (limited to 'src/basic/dirent-util.h')
-rw-r--r-- | src/basic/dirent-util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/basic/dirent-util.h b/src/basic/dirent-util.h index 768cc1de61..a6272f891f 100644 --- a/src/basic/dirent-util.h +++ b/src/basic/dirent-util.h @@ -56,3 +56,9 @@ assert_cc(sizeof_field(struct dirent, d_name) == sizeof_field(struct dirent64, d for (void *_end = (uint8_t*) ({ (de) = (buf); }) + (sz); \ (uint8_t*) (de) < (uint8_t*) _end; \ (de) = (struct dirent*) ((uint8_t*) (de) + (de)->d_reclen)) + +#define DEFINE_DIRENT_BUFFER(name, sz) \ + union { \ + struct dirent de; \ + uint8_t data[(sz) * DIRENT_SIZE_MAX]; \ + } name |