From: Marc Rittinghaus Date: Thu, 11 Aug 2022 07:08:11 +0000 (+0200) Subject: Remove poll/select and eventfd stubs X-Git-Tag: RELEASE-0.10.0~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e452cc1cfcf2358e853496e8ffd26116a4cbccdb;p=unikraft%2Flibs%2Fnewlib.git Remove poll/select and eventfd stubs This commit removes the stubs for functions provided by the new posix-socket and posix-event libraries. Signed-off-by: Marc Rittinghaus Reviewed-by: Cezar Craciunoiu Reviewed-by: Razvan Deaconescu Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Pull-Request: #23 --- diff --git a/file.c b/file.c index 17fdf8f..2c433bd 100644 --- a/file.c +++ b/file.c @@ -34,56 +34,7 @@ */ #include -#include -#include -#include -#if CONFIG_LWIP_SOCKET -#include -#else -#include -#include -#endif -#include -#include -#undef errno #include -extern int errno; - -#define STDIN_FILENO 0 /* standard input file descriptor */ -#define STDOUT_FILENO 1 /* standard output file descriptor */ -#define STDERR_FILENO 2 /* standard error file descriptor */ - -#if !CONFIG_LWIP_SOCKET -int poll(struct pollfd _pfd[] __unused, nfds_t _nfds __unused, - int _timeout __unused) -{ - errno = ENOTSUP; - return -1; -} - -int select(int nfds, fd_set *readfds __unused, fd_set *writefds __unused, - fd_set *exceptfds __unused, struct timeval *timeout) -{ - uint64_t nsecs; - - if (nfds == 0) { - nsecs = timeout->tv_sec * 1000000000; - nsecs += timeout->tv_usec * 1000; - uk_sched_thread_sleep(nsecs); - return 0; - } - - errno = ENOTSUP; - return -1; -} -#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) {