--- /dev/null
+From ab6c1cf39135f9b11524267a0d3b517b88f4ff27 Mon Sep 17 00:00:00 2001
+From: gaulthier gain <gaulthier.gain@uliege.be>
+Date: Fri, 9 Oct 2020 15:18:24 +0000
+Subject: [PATCH] Stub istty by ignoring ioctl
+
+Signed-off-by: gaulthier gain <gaulthier.gain@uliege.be>
+---
+ src/unistd/isatty.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/unistd/isatty.c b/src/unistd/isatty.c
+index c8badaf..a0f34d5 100644
+--- a/src/unistd/isatty.c
++++ b/src/unistd/isatty.c
+@@ -5,5 +5,5 @@
+ int isatty(int fd)
+ {
+ struct winsize wsz;
+- return !__syscall(SYS_ioctl, fd, TIOCGWINSZ, &wsz);
++ return 1; //!__syscall(SYS_ioctl, fd, TIOCGWINSZ, &wsz);
+ }
+--
+2.17.1
+
+++ /dev/null
-From 235b3d8240fbc99782f2fb8449786f519fcb3bde Mon Sep 17 00:00:00 2001
-From: gaulthier gain <gaulthier.gain@uliege.be>
-Date: Fri, 28 Feb 2020 17:05:28 +0000
-Subject: [UNIKRAFT/MUSL] Update __stdout_write to allow flushing on stdout
-
-Signed-off-by: gaulthier gain <gaulthier.gain@uliege.be>
----
- src/stdio/__stdout_write.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/stdio/__stdout_write.c b/src/stdio/__stdout_write.c
-index dd1ec60..f9c9489 100644
---- a/src/stdio/__stdout_write.c
-+++ b/src/stdio/__stdout_write.c
-@@ -6,6 +6,6 @@ size_t __stdout_write(FILE *f, const unsigned char *buf, size_t len)
- struct winsize wsz;
- f->write = __stdio_write;
- if (!(f->flags & F_SVB) && __syscall(SYS_ioctl, f->fd, TIOCGWINSZ, &wsz))
-- f->lbf = -1;
-+ f->lbf = '\n';
- return __stdio_write(f, buf, len);
- }
---
-2.17.1
-
--- /dev/null
+From 120d042546de02e005e668306ff4022bdaf784b4 Mon Sep 17 00:00:00 2001
+From: gaulthier gain <gaulthier.gain@uliege.be>
+Date: Fri, 9 Oct 2020 15:32:04 +0000
+Subject: [PATCH] Fix stdio_write output
+
+Signed-off-by: gaulthier gain <gaulthier.gain@uliege.be>
+---
+ src/stdio/__stdio_write.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/stdio/__stdio_write.c b/src/stdio/__stdio_write.c
+index d2d8947..cae0ea9 100644
+--- a/src/stdio/__stdio_write.c
++++ b/src/stdio/__stdio_write.c
+@@ -24,7 +24,7 @@ size_t __stdio_write(FILE *f, const unsigned char *buf, size_t len)
+ return iovcnt == 2 ? 0 : len-iov[0].iov_len;
+ }
+ rem -= cnt;
+- if (cnt > iov[0].iov_len) {
++ if (cnt >= iov[0].iov_len) {
+ cnt -= iov[0].iov_len;
+ iov++; iovcnt--;
+ }
+--
+2.17.1
+
+++ /dev/null
-From 1ea6a69be49facc99b969831a4e27e954ae05da5 Mon Sep 17 00:00:00 2001
-From: gaulthier gain <gaulthier.gain@uliege.be>
-Date: Tue, 6 Oct 2020 07:55:19 +0000
-Subject: [UNIKRAFT/MUSL] Add _SC_LEVEL1_DCACHE_LINESIZE to unistd
-
-Signed-off-by: gaulthier gain <gaulthier.gain@uliege.be>
----
- include/unistd.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/unistd.h b/include/unistd.h
-index 6ee0f1f..452f004 100644
---- a/include/unistd.h
-+++ b/include/unistd.h
-@@ -250,7 +250,7 @@ int eaccess(const char *, int);
-
- #include <bits/posix.h>
-
--
-+#define _SC_LEVEL1_DCACHE_LINESIZE 130
-
- #define _PC_LINK_MAX 0
- #define _PC_MAX_CANON 1
---
-2.17.1
-
--- /dev/null
+From 8ecbb57a730c20505e6117e8c5f012ed3348e1ec Mon Sep 17 00:00:00 2001
+From: gaulthier gain <gaulthier.gain@uliege.be>
+Date: Fri, 9 Oct 2020 15:57:11 +0000
+Subject: [PATCH] Update stdoutwrite by removing ioctl
+
+Signed-off-by: gaulthier gain <gaulthier.gain@uliege.be>
+---
+ src/stdio/__stdout_write.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/stdio/__stdout_write.c b/src/stdio/__stdout_write.c
+index dd1ec60..70dc450 100644
+--- a/src/stdio/__stdout_write.c
++++ b/src/stdio/__stdout_write.c
+@@ -5,7 +5,7 @@ size_t __stdout_write(FILE *f, const unsigned char *buf, size_t len)
+ {
+ struct winsize wsz;
+ f->write = __stdio_write;
+- if (!(f->flags & F_SVB) && __syscall(SYS_ioctl, f->fd, TIOCGWINSZ, &wsz))
++ if (!(f->flags & F_SVB))
+ f->lbf = -1;
+ return __stdio_write(f, buf, len);
+ }
+--
+2.17.1
+
--- /dev/null
+From 1ea6a69be49facc99b969831a4e27e954ae05da5 Mon Sep 17 00:00:00 2001
+From: gaulthier gain <gaulthier.gain@uliege.be>
+Date: Tue, 6 Oct 2020 07:55:19 +0000
+Subject: [PATCH] Add _SC_LEVEL1_DCACHE_LINESIZE to unistd
+
+Signed-off-by: gaulthier gain <gaulthier.gain@uliege.be>
+---
+ include/unistd.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/unistd.h b/include/unistd.h
+index 6ee0f1f..452f004 100644
+--- a/include/unistd.h
++++ b/include/unistd.h
+@@ -250,7 +250,7 @@ int eaccess(const char *, int);
+
+ #include <bits/posix.h>
+
+-
++#define _SC_LEVEL1_DCACHE_LINESIZE 130
+
+ #define _PC_LINK_MAX 0
+ #define _PC_MAX_CANON 1
+--
+2.17.1
+