[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/LIBUCONTEXT PATCH v2 3/4] Add patch for the original code



Replace signal.h with musl's ucontext.h. makecontext uses the struct
ucontext_t and this struct is defined in bits/signal.h which included
from ucontext.h. In musl signal.h includes bits/signal.h but this is not
the case with newlib which has no definition for ucontext_t struct.
 
Signed-off-by: Charalampos Mainas <Charalampos.Mainas@xxxxxxxxx>
---
 patches/0001-Add-ucontext-header-file.patch | 32 +++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 patches/0001-Add-ucontext-header-file.patch

diff --git a/patches/0001-Add-ucontext-header-file.patch 
b/patches/0001-Add-ucontext-header-file.patch
new file mode 100644
index 0000000..37a19a5
--- /dev/null
+++ b/patches/0001-Add-ucontext-header-file.patch
@@ -0,0 +1,32 @@
+From bbcaae992f53d8648abab5254e81bdf30640911c Mon Sep 17 00:00:00 2001
+From: Charalampos Mainas <Charalampos.Mainas@xxxxxxxxx>
+Date: Wed, 29 May 2019 11:34:03 +0200
+Subject: [PATCH] Add ucontext header file
+
+makecontext uses the struct ucontext_t which is not defined anywhere in
+newlib. In musl signal.h includes bits/signal.h which defines ucontext_t
+struct. Therefore newlib's signal.h is replaced by musl's ucontext.h
+header which includes bits/signal.h.
+
+Signed-off-by: Charalampos Mainas <Charalampos.Mainas@xxxxxxxxx>
+
+---
+ arch/x86_64/makecontext.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/x86_64/makecontext.c b/arch/x86_64/makecontext.c
+index ba6ca59..e272008 100644
+--- a/arch/x86_64/makecontext.c
++++ b/arch/x86_64/makecontext.c
+@@ -13,7 +13,7 @@
+ #define _GNU_SOURCE
+ #include <stddef.h>
+ #include <stdarg.h>
+-#include <signal.h>
++#include <ucontext.h>
+ #include <string.h>
+ #include <stdint.h>
+ 
+-- 
+2.17.1
+
-- 
2.17.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.