|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT/NEWLIB PATCH] Add missing stubs and declarations to support Ruby
Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
console.c | 8 ++++++++
file.c | 7 +++++++
include/sys/poll.h | 5 +++++
signal.c | 8 ++++++++
4 files changed, 28 insertions(+)
diff --git a/console.c b/console.c
index bf9cfe8..6ec84cd 100644
--- a/console.c
+++ b/console.c
@@ -38,6 +38,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <uk/essentials.h>
+#include <uk/print.h>
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..8127ee0 100644
--- a/file.c
+++ b/file.c
@@ -79,6 +79,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/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 <uk/process.h>
+#include <uk/print.h>
#include <errno.h>
#include <signal.h>
@@ -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;
+}
--
2.20.1
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |