1 //===-- Definition of type struct dirent ----------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIBC_TYPES_STRUCT_DIRENT_H
10 #define LLVM_LIBC_TYPES_STRUCT_DIRENT_H
12 #include "llvm-libc-types/ino_t.h"
13 #include "llvm-libc-types/off_t.h"
19 unsigned short d_reclen
;
22 // The user code should use strlen to determine actual the size of d_name.
23 // Likewise, it is incorrect and prohibited by the POSIX standard to detemine
24 // the size of struct dirent type using sizeof. The size should be got using
25 // a different method, for example, from the d_reclen field on Linux.
29 #endif // LLVM_LIBC_TYPES_STRUCT_DIRENT_H