[flang] Use object before converts in fir.dispatch (#68589)
[llvm-project.git] / libc / include / llvm-libc-types / struct_dirent.h
blobde54a2262446f5ac7a843f027e02fbb608977943
1 //===-- Definition of type struct dirent ----------------------------------===//
2 //
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
6 //
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>
15 struct dirent {
16 ino_t d_ino;
17 #ifdef __linux__
18 off_t d_off;
19 unsigned short d_reclen;
20 #endif
21 unsigned char d_type;
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.
26 char d_name[1];
29 #endif // __LLVM_LIBC_TYPES_STRUCT_DIRENT_H__