diff --git a/newlib/libc/sys/jehanne/sys/dirent.h b/newlib/libc/sys/jehanne/sys/dirent.h index 36e9e94bc..04a674910 100644 --- a/newlib/libc/sys/jehanne/sys/dirent.h +++ b/newlib/libc/sys/jehanne/sys/dirent.h @@ -41,6 +41,9 @@ typedef struct { #define dirent64 dirent #endif +#ifndef _DIRENT_H_ +/* Newlib's dirent.h already defines these */ + DIR *opendir(const char *); struct dirent *readdir(DIR *); int readdir_r(DIR *__restrict, struct dirent *__restrict, @@ -50,6 +53,8 @@ int dirfd(DIR *); DIR *fdopendir(int); int closedir(DIR *); +#endif + #ifndef _POSIX_SOURCE long telldir (DIR *); void seekdir (DIR *, off_t loc);