From: Costin Lupu Date: Fri, 6 Dec 2019 13:25:16 +0000 (+0200) Subject: Add missing stubs and declarations to support Ruby X-Git-Tag: RELEASE-0.4~9 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=63fb259f5f52ff7477e0619bd23a9b9abfbfc7c2;p=unikraft%2Flibs%2Fnewlib.git Add missing stubs and declarations to support Ruby Signed-off-by: Costin Lupu Reviewed-by: Stefan Teodorescu --- diff --git a/console.c b/console.c index bf9cfe8..6ec84cd 100644 --- a/console.c +++ b/console.c @@ -38,6 +38,7 @@ #include #include #include +#include int isatty(int fd) { @@ -63,3 +64,10 @@ char *ctermid(char *s __unused) { return 0; } + +int grantpt(int fd) +{ + WARN_STUBBED(); + errno = ENOTSUP; + return -1; +} diff --git a/file.c b/file.c index 7a6e046..4d5de24 100644 --- a/file.c +++ b/file.c @@ -38,6 +38,7 @@ #include #include #include +#include #if CONFIG_LWIP_SOCKET #include #else @@ -79,6 +80,13 @@ int select(int nfds, fd_set *readfds __unused, fd_set *writefds __unused, } #endif /* !CONFIG_LWIP_SOCKET */ +int eventfd(unsigned int initval, int flags) +{ + WARN_STUBBED(); + errno = ENOTSUP; + return -1; +} + char *realpath(const char *restrict file_name, char *restrict resolved_name) { return 0; diff --git a/include/fcntl.h b/include/fcntl.h index cb271d2..feb4f7c 100644 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -46,4 +46,6 @@ #define AT_EMPTY_PATH 0x1000 #endif +int posix_fadvise(int fd, off_t offset, off_t len, int advice); + #endif diff --git a/include/sys/poll.h b/include/sys/poll.h index 0827738..446ab3f 100644 --- a/include/sys/poll.h +++ b/include/sys/poll.h @@ -84,4 +84,9 @@ struct pollfd { int poll(struct pollfd _pfd[], nfds_t _nfds, int _timeout); +#ifdef _GNU_SOURCE +int ppoll(struct pollfd *fds, nfds_t nfds, + const struct timespec *tmo_p, const sigset_t *sigmask); +#endif + #endif /* _POSIX_SYS_POLL_H_ */ diff --git a/signal.c b/signal.c index 0530291..4279ee7 100644 --- a/signal.c +++ b/signal.c @@ -33,6 +33,7 @@ */ #include +#include #include #include @@ -77,3 +78,10 @@ int killpg(int pgrp, int sig __unused) errno = ESRCH; return -1; } + +int sigaltstack(const stack_t *ss, stack_t *old_ss) +{ + WARN_STUBBED(); + errno = ENOTSUP; + return -1; +}