From: Charalampos Mainas Date: Mon, 9 Sep 2019 09:58:00 +0000 (+0200) Subject: Add patch for the original code X-Git-Tag: RELEASE-0.4~2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=34d4388d8ac1a0dedd46833fd64ced79bc79e17f;p=unikraft%2Flibs%2Flibucontext.git 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 Reviewed-by: Costin Lupu --- 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 +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 + +--- + 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 + #include +-#include ++#include + #include + #include + +-- +2.17.1 +