]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
Remove poll/select and eventfd stubs
authorMarc Rittinghaus <marc.rittinghaus@kit.edu>
Thu, 11 Aug 2022 07:08:11 +0000 (09:08 +0200)
committerUnikraft <monkey@unikraft.io>
Tue, 16 Aug 2022 16:29:57 +0000 (16:29 +0000)
This commit removes the stubs for functions provided by the
new posix-socket and posix-event libraries.

Signed-off-by: Marc Rittinghaus <marc.rittinghaus@kit.edu>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@gmail.com>
Reviewed-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Approved-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Pull-Request: #23

file.c

diff --git a/file.c b/file.c
index 17fdf8f45bc5650375ec32a95eefa8c4811b06ee..2c433bdaa6c2abee71a09e22fc6d05f7b23f4d0e 100644 (file)
--- a/file.c
+++ b/file.c
  */
 
 #include <uk/config.h>
-#include <uk/sched.h>
-#include <uk/plat/console.h>
-#include <uk/print.h>
-#if CONFIG_LWIP_SOCKET
-#include <lwip/sockets.h>
-#else
-#include <poll.h>
-#include <sys/select.h>
-#endif
-#include <sys/stat.h>
-#include <errno.h>
-#undef errno
 #include <stdlib.h>
-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)
 {