diff --git a/headers/posix/dirent.h b/headers/posix/dirent.h index 9622a265ac..aeac58e3d2 100644 --- a/headers/posix/dirent.h +++ b/headers/posix/dirent.h @@ -15,7 +15,11 @@ typedef struct dirent { ino_t d_ino; /* inode number */ ino_t d_pino; /* parent inode (only for queries) */ unsigned short d_reclen; /* length of this record, not the name */ - char d_name[1]; /* name of the entry (null byte terminated) */ +#if __GNUC__ == 2 + char d_name[0]; /* name of the entry (null byte terminated) */ +#else + char d_name[]; /* name of the entry (null byte terminated) */ +#endif } dirent_t; typedef struct __DIR DIR; diff --git a/headers/private/fs_shell/fssh_dirent.h b/headers/private/fs_shell/fssh_dirent.h index 73220e5499..aa33b81b68 100644 --- a/headers/private/fs_shell/fssh_dirent.h +++ b/headers/private/fs_shell/fssh_dirent.h @@ -14,7 +14,11 @@ typedef struct fssh_dirent { fssh_ino_t d_ino; /* inode number */ fssh_ino_t d_pino; /* parent inode (only for queries) */ unsigned short d_reclen; /* length of this record, not the name */ - char d_name[1]; /* name of the entry (null byte terminated) */ +#if __GNUC__ == 2 + char d_name[0]; /* name of the entry (null byte terminated) */ +#else + char d_name[]; /* name of the entry (null byte terminated) */ +#endif } fssh_dirent_t; typedef struct {