From 808d02b453083662f025c62c09921e07a006de86 Mon Sep 17 00:00:00 2001 From: Giacomo Tesio Date: Fri, 27 Dec 2019 16:03:04 +0100 Subject: [PATCH] jehanne: protect sys/dirent.h functions --- newlib/libc/sys/jehanne/sys/dirent.h | 5 +++++ 1 file changed, 5 insertions(+) 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);