From 4d4d401732e42b8fe77b4697eb27bc77dc4d4b38 Mon Sep 17 00:00:00 2001 From: Matheus Date: Tue, 11 Oct 2022 23:52:41 -0300 Subject: [PATCH] jinx: update mlibc port to add support to new system calls --- patches/mlibc/sysdeps.patch | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/patches/mlibc/sysdeps.patch b/patches/mlibc/sysdeps.patch index 2d352a41..5451b5ec 100644 --- a/patches/mlibc/sysdeps.patch +++ b/patches/mlibc/sysdeps.patch @@ -59,8 +59,8 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/entry.cpp mlib + diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/generic.cpp mlibc/sysdeps/astral/generic/generic.cpp --- mlibc-3.0.0-rc1/sysdeps/astral/generic/generic.cpp 1969-12-31 21:00:00.000000000 -0300 -+++ mlibc/sysdeps/astral/generic/generic.cpp 2022-10-10 20:13:02.696597980 -0300 -@@ -0,0 +1,288 @@ ++++ mlibc/sysdeps/astral/generic/generic.cpp 2022-10-11 20:30:53.106656205 -0300 +@@ -0,0 +1,293 @@ +#include +#include +#include @@ -168,6 +168,11 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/generic/generic.cpp ml + return 0; + + } ++ ++ int sys_mkdir(const char* path, mode_t mode){ ++ long res; ++ return syscall(SYSCALL_MKDIR, &res, (uint64_t)path, mode); ++ } + + int sys_pipe(int *fds, int flags){ + long res; @@ -366,8 +371,8 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/include/astral/archctl +#endif diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/include/astral/syscall.h mlibc/sysdeps/astral/include/astral/syscall.h --- mlibc-3.0.0-rc1/sysdeps/astral/include/astral/syscall.h 1969-12-31 21:00:00.000000000 -0300 -+++ mlibc/sysdeps/astral/include/astral/syscall.h 2022-10-10 16:31:06.853132251 -0300 -@@ -0,0 +1,50 @@ ++++ mlibc/sysdeps/astral/include/astral/syscall.h 2022-10-11 20:31:06.006656102 -0300 +@@ -0,0 +1,51 @@ +#ifndef _SYSCALL_H_INCLUDE +#define _SYSCALL_H_INCLUDE + @@ -396,6 +401,7 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/include/astral/syscall +#define SYSCALL_CHDIR 22 +#define SYSCALL_FSTATAT 23 +#define SYSCALL_PIPE2 24 ++#define SYSCALL_MKDIR 25 + +#include +#include @@ -418,7 +424,6 @@ diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/include/astral/syscall +} + +#endif -Os arquivos binários mlibc-3.0.0-rc1/sysdeps/astral/include/astral/.syscall.h.swp e mlibc/sysdeps/astral/include/astral/.syscall.h.swp são diferentes diff -ruN --no-dereference mlibc-3.0.0-rc1/sysdeps/astral/meson.build mlibc/sysdeps/astral/meson.build --- mlibc-3.0.0-rc1/sysdeps/astral/meson.build 1969-12-31 21:00:00.000000000 -0300 +++ mlibc/sysdeps/astral/meson.build 2022-10-10 16:31:06.853132251 -0300