From 7064f720bd85c9c2a7fe70da33978e672a8aa91f Mon Sep 17 00:00:00 2001 From: Giacomo Tesio Date: Fri, 27 Dec 2019 16:03:50 +0100 Subject: [PATCH] jehanne: avoid standard C functions in libposix_conf.c --- newlib/libc/sys/jehanne/libposix_conf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/newlib/libc/sys/jehanne/libposix_conf.c b/newlib/libc/sys/jehanne/libposix_conf.c index ef4813d91..54f674ea4 100644 --- a/newlib/libc/sys/jehanne/libposix_conf.c +++ b/newlib/libc/sys/jehanne/libposix_conf.c @@ -89,6 +89,9 @@ struct Dir { #define DMEXEC 0x1 /* mode bit for execute permission */ extern void jehanne_sysfatal(const char*, ...); +extern int jehanne_strcmp(const char*, const char*); +extern char* jehanne_strstr(const char*, const char*); +extern int32_t jehanne_tm2sec(Tm*); #include #include @@ -113,7 +116,7 @@ __stat_reader(struct stat *s, const Dir *d) /* we have to map types to UNIX */ if(d->mode & DMDIR) s->st_mode |= _IFDIR; - else if(strcmp("cons", d->name) == 0 || strstr(d->name, "tty") != nil){ + else if(jehanne_strcmp("cons", d->name) == 0 || jehanne_strstr(d->name, "tty") != nil){ /* newlib expect consoles to be character devices */ s->st_mode |= _IFCHR; } else