Skip to content

Commit d9c16ef

Browse files
rcitachmysterywolf
authored andcommitted
Modify the position of libc_rent definition
1 parent 5e8602c commit d9c16ef

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

components/libc/compilers/common/include/dirent.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@ struct dirent
6565
};
6666
#endif
6767

68+
#ifdef RT_USING_MUSLLIBC
69+
typedef uint64_t ino_t;
70+
#endif
71+
struct libc_dirent {
72+
ino_t d_ino;
73+
off_t d_off;
74+
unsigned short d_reclen;
75+
unsigned char d_type;
76+
char d_name[DIRENT_NAME_MAX];
77+
};
78+
6879
int closedir(DIR *);
6980
DIR *opendir(const char *);
7081
struct dirent *readdir(DIR *);

components/lwp/lwp_syscall.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4527,18 +4527,6 @@ sysret_t sys_rmdir(const char *path)
45274527
#endif
45284528
}
45294529

4530-
#ifdef RT_USING_MUSLLIBC
4531-
typedef uint64_t ino_t;
4532-
#endif
4533-
4534-
struct libc_dirent {
4535-
ino_t d_ino;
4536-
off_t d_off;
4537-
unsigned short d_reclen;
4538-
unsigned char d_type;
4539-
char d_name[DIRENT_NAME_MAX];
4540-
};
4541-
45424530
sysret_t sys_getdents(int fd, struct libc_dirent *dirp, size_t nbytes)
45434531
{
45444532
int ret = -1;

0 commit comments

Comments
 (0)