From c280bb79aaa6504aed01c1d4f95dc3b21d161845 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 27 Feb 2023 20:27:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20M=E6=A0=B8musl=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 方案描述: 1, 对比1.23musl源码, M核合入部分新增宏定义 fix #I6I6VD Signed-off-by: wangchen --- porting/liteos_m/kernel/include/complex.h | 1 - porting/liteos_m/kernel/include/fenv.h | 1 - porting/liteos_m/kernel/include/pthread.h | 6 +++++- porting/liteos_m/kernel/include/sched.h | 1 + porting/liteos_m/kernel/include/signal.h | 9 +++++++++ porting/liteos_m/kernel/include/stdlib.h | 2 ++ porting/liteos_m/kernel/include/stdnoreturn.h | 2 -- porting/liteos_m/kernel/include/sys/prctl.h | 19 +++++++++++++++++++ porting/liteos_m/kernel/include/time.h | 1 + porting/liteos_m/kernel/include/unistd.h | 4 ++++ .../kernel/include/arpa/tftp.h | 1 + .../liteos_m_iccarm/kernel/include/pthread.h | 6 +++++- .../liteos_m_iccarm/kernel/include/sched.h | 1 + .../liteos_m_iccarm/kernel/include/signal.h | 9 +++++++++ .../kernel/include/sys/prctl.h | 19 +++++++++++++++++++ .../liteos_m_iccarm/kernel/include/unistd.h | 4 ++++ porting/uniproton/kernel/include/complex.h | 1 - porting/uniproton/kernel/include/fenv.h | 1 - porting/uniproton/kernel/include/pthread.h | 6 +++++- porting/uniproton/kernel/include/sched.h | 1 + porting/uniproton/kernel/include/signal.h | 9 +++++++++ porting/uniproton/kernel/include/stdlib.h | 2 ++ .../uniproton/kernel/include/stdnoreturn.h | 2 -- porting/uniproton/kernel/include/sys/prctl.h | 19 +++++++++++++++++++ porting/uniproton/kernel/include/time.h | 1 + porting/uniproton/kernel/include/unistd.h | 4 ++++ 26 files changed, 121 insertions(+), 11 deletions(-) diff --git a/porting/liteos_m/kernel/include/complex.h b/porting/liteos_m/kernel/include/complex.h index 788c231d..008b3c7e 100644 --- a/porting/liteos_m/kernel/include/complex.h +++ b/porting/liteos_m/kernel/include/complex.h @@ -130,5 +130,4 @@ long double creall(long double complex); #ifdef __cplusplus } #endif - #endif diff --git a/porting/liteos_m/kernel/include/fenv.h b/porting/liteos_m/kernel/include/fenv.h index 39bb3aba..05de990c 100644 --- a/porting/liteos_m/kernel/include/fenv.h +++ b/porting/liteos_m/kernel/include/fenv.h @@ -24,6 +24,5 @@ int feupdateenv(const fenv_t *); #ifdef __cplusplus } #endif - #endif diff --git a/porting/liteos_m/kernel/include/pthread.h b/porting/liteos_m/kernel/include/pthread.h index f9fffaa2..86d05681 100644 --- a/porting/liteos_m/kernel/include/pthread.h +++ b/porting/liteos_m/kernel/include/pthread.h @@ -26,6 +26,7 @@ extern "C" { #define __NEED_size_t #include + #include #include @@ -80,6 +81,9 @@ extern "C" { #define PTHREAD_BARRIER_SERIAL_THREAD (-1) +#define PTHREAD_NULL ((pthread_t)0) + + int pthread_create(pthread_t *__restrict, const pthread_attr_t *__restrict, void *(*)(void *), void *__restrict); int pthread_detach(pthread_t); void pthread_exit(void *); @@ -220,8 +224,8 @@ struct cpu_set_t; int pthread_getaffinity_np(pthread_t, size_t, struct cpu_set_t *); int pthread_setaffinity_np(pthread_t, size_t, const struct cpu_set_t *); int pthread_getattr_np(pthread_t, pthread_attr_t *); -int pthread_getname_np(pthread_t, char *, size_t); int pthread_setname_np(pthread_t, const char *); +int pthread_getname_np(pthread_t, char *, size_t); int pthread_getattr_default_np(pthread_attr_t *); int pthread_setattr_default_np(const pthread_attr_t *); int pthread_tryjoin_np(pthread_t, void **); diff --git a/porting/liteos_m/kernel/include/sched.h b/porting/liteos_m/kernel/include/sched.h index 605bf91b..49b4561f 100644 --- a/porting/liteos_m/kernel/include/sched.h +++ b/porting/liteos_m/kernel/include/sched.h @@ -36,6 +36,7 @@ int sched_yield(void); #ifdef _GNU_SOURCE #define CSIGNAL 0x000000ff +#define CLONE_NEWTIME 0x00000080 #define CLONE_VM 0x00000100 #define CLONE_FS 0x00000200 #define CLONE_FILES 0x00000400 diff --git a/porting/liteos_m/kernel/include/signal.h b/porting/liteos_m/kernel/include/signal.h index 99572f9f..3a0b2e67 100644 --- a/porting/liteos_m/kernel/include/signal.h +++ b/porting/liteos_m/kernel/include/signal.h @@ -75,6 +75,8 @@ typedef struct sigaltstack stack_t; #define SEGV_ACCERR 2 #define SEGV_BNDERR 3 #define SEGV_PKUERR 4 +#define SEGV_MTEAERR 8 +#define SEGV_MTESERR 9 #define BUS_ADRALN 1 #define BUS_ADRERR 2 @@ -176,6 +178,9 @@ struct sigaction { #define sa_handler __sa_handler.sa_handler #define sa_sigaction __sa_handler.sa_sigaction +#define SA_UNSUPPORTED 0x00000400 +#define SA_EXPOSE_TAGBITS 0x00000800 + struct sigevent { union sigval sigev_value; int sigev_signo; @@ -188,6 +193,7 @@ struct sigevent { #define SIGEV_SIGNAL 0 #define SIGEV_NONE 1 #define SIGEV_THREAD 2 +#define SIGEV_THREAD_ID 4 int __libc_current_sigrtmin(void); int __libc_current_sigrtmax(void); @@ -249,6 +255,9 @@ void (*sigset(int, void (*)(int)))(int); #if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) #define NSIG _NSIG typedef void (*sig_t)(int); + +#define SYS_SECCOMP 1 +#define SYS_USER_DISPATCH 2 #endif #ifdef _GNU_SOURCE diff --git a/porting/liteos_m/kernel/include/stdlib.h b/porting/liteos_m/kernel/include/stdlib.h index 0a5143df..940f3ddf 100644 --- a/porting/liteos_m/kernel/include/stdlib.h +++ b/porting/liteos_m/kernel/include/stdlib.h @@ -146,6 +146,8 @@ int getloadavg(double *, int); int clearenv(void); #define WCOREDUMP(s) ((s) & 0x80) #define WIFCONTINUED(s) ((s) == 0xffff) +void *reallocarray (void *, size_t, size_t); +void qsort_r (void *, size_t, size_t, int (*)(const void *, const void *, void *), void *); #endif #ifdef _GNU_SOURCE diff --git a/porting/liteos_m/kernel/include/stdnoreturn.h b/porting/liteos_m/kernel/include/stdnoreturn.h index 87b302ca..5c6aeeb0 100644 --- a/porting/liteos_m/kernel/include/stdnoreturn.h +++ b/porting/liteos_m/kernel/include/stdnoreturn.h @@ -1,9 +1,7 @@ #ifndef _STDNORETURN_H #define _STDNORETURN_H - #ifndef __cplusplus #include #define noreturn _Noreturn #endif - #endif diff --git a/porting/liteos_m/kernel/include/sys/prctl.h b/porting/liteos_m/kernel/include/sys/prctl.h index d9c846e9..087a75c9 100644 --- a/porting/liteos_m/kernel/include/sys/prctl.h +++ b/porting/liteos_m/kernel/include/sys/prctl.h @@ -157,6 +157,25 @@ struct prctl_mm_map { #define PR_SET_TAGGED_ADDR_CTRL 55 #define PR_GET_TAGGED_ADDR_CTRL 56 #define PR_TAGGED_ADDR_ENABLE (1UL << 0) +#define PR_MTE_TCF_SHIFT 1 +#define PR_MTE_TCF_NONE (0UL << 1) +#define PR_MTE_TCF_SYNC (1UL << 1) +#define PR_MTE_TCF_ASYNC (2UL << 1) +#define PR_MTE_TCF_MASK (3UL << 1) +#define PR_MTE_TAG_SHIFT 3 +#define PR_MTE_TAG_MASK (0xffffUL << 3) + +#define PR_SET_IO_FLUSHER 57 +#define PR_GET_IO_FLUSHER 58 + +#define PR_SET_SYSCALL_USER_DISPATCH 59 +#define PR_SYS_DISPATCH_OFF 0 +#define PR_SYS_DISPATCH_ON 1 +#define SYSCALL_DISPATCH_FILTER_ALLOW 0 +#define SYSCALL_DISPATCH_FILTER_BLOCK 1 + +#define PR_PAC_SET_ENABLED_KEYS 60 +#define PR_PAC_GET_ENABLED_KEYS 61 int prctl (int, ...); diff --git a/porting/liteos_m/kernel/include/time.h b/porting/liteos_m/kernel/include/time.h index e30667be..02d02948 100644 --- a/porting/liteos_m/kernel/include/time.h +++ b/porting/liteos_m/kernel/include/time.h @@ -163,4 +163,5 @@ __REDIR(timegm, __timegm_time64); } #endif + #endif diff --git a/porting/liteos_m/kernel/include/unistd.h b/porting/liteos_m/kernel/include/unistd.h index 4945156a..52e88913 100644 --- a/porting/liteos_m/kernel/include/unistd.h +++ b/porting/liteos_m/kernel/include/unistd.h @@ -16,6 +16,8 @@ extern "C" { #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 +#define SEEK_DATA 3 +#define SEEK_HOLE 4 #define __NEED_size_t #define __NEED_ssize_t @@ -78,6 +80,7 @@ unsigned sleep(unsigned); int pause(void); pid_t fork(void); +pid_t _Fork(void); int execve(const char *, char *const [], char *const []); int execv(const char *, char *const []); int execle(const char *, const char *, ...); @@ -186,6 +189,7 @@ int syncfs(int); int euidaccess(const char *, int); int eaccess(const char *, int); ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned); +pid_t gettid(void); #endif #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) diff --git a/porting/liteos_m_iccarm/kernel/include/arpa/tftp.h b/porting/liteos_m_iccarm/kernel/include/arpa/tftp.h index 5cacd2b5..799c54f2 100644 --- a/porting/liteos_m_iccarm/kernel/include/arpa/tftp.h +++ b/porting/liteos_m_iccarm/kernel/include/arpa/tftp.h @@ -28,3 +28,4 @@ struct tftphdr { #define EEXISTS 6 #define ENOUSER 7 #endif + diff --git a/porting/liteos_m_iccarm/kernel/include/pthread.h b/porting/liteos_m_iccarm/kernel/include/pthread.h index f9fffaa2..86d05681 100644 --- a/porting/liteos_m_iccarm/kernel/include/pthread.h +++ b/porting/liteos_m_iccarm/kernel/include/pthread.h @@ -26,6 +26,7 @@ extern "C" { #define __NEED_size_t #include + #include #include @@ -80,6 +81,9 @@ extern "C" { #define PTHREAD_BARRIER_SERIAL_THREAD (-1) +#define PTHREAD_NULL ((pthread_t)0) + + int pthread_create(pthread_t *__restrict, const pthread_attr_t *__restrict, void *(*)(void *), void *__restrict); int pthread_detach(pthread_t); void pthread_exit(void *); @@ -220,8 +224,8 @@ struct cpu_set_t; int pthread_getaffinity_np(pthread_t, size_t, struct cpu_set_t *); int pthread_setaffinity_np(pthread_t, size_t, const struct cpu_set_t *); int pthread_getattr_np(pthread_t, pthread_attr_t *); -int pthread_getname_np(pthread_t, char *, size_t); int pthread_setname_np(pthread_t, const char *); +int pthread_getname_np(pthread_t, char *, size_t); int pthread_getattr_default_np(pthread_attr_t *); int pthread_setattr_default_np(const pthread_attr_t *); int pthread_tryjoin_np(pthread_t, void **); diff --git a/porting/liteos_m_iccarm/kernel/include/sched.h b/porting/liteos_m_iccarm/kernel/include/sched.h index 605bf91b..49b4561f 100644 --- a/porting/liteos_m_iccarm/kernel/include/sched.h +++ b/porting/liteos_m_iccarm/kernel/include/sched.h @@ -36,6 +36,7 @@ int sched_yield(void); #ifdef _GNU_SOURCE #define CSIGNAL 0x000000ff +#define CLONE_NEWTIME 0x00000080 #define CLONE_VM 0x00000100 #define CLONE_FS 0x00000200 #define CLONE_FILES 0x00000400 diff --git a/porting/liteos_m_iccarm/kernel/include/signal.h b/porting/liteos_m_iccarm/kernel/include/signal.h index 99572f9f..3a0b2e67 100644 --- a/porting/liteos_m_iccarm/kernel/include/signal.h +++ b/porting/liteos_m_iccarm/kernel/include/signal.h @@ -75,6 +75,8 @@ typedef struct sigaltstack stack_t; #define SEGV_ACCERR 2 #define SEGV_BNDERR 3 #define SEGV_PKUERR 4 +#define SEGV_MTEAERR 8 +#define SEGV_MTESERR 9 #define BUS_ADRALN 1 #define BUS_ADRERR 2 @@ -176,6 +178,9 @@ struct sigaction { #define sa_handler __sa_handler.sa_handler #define sa_sigaction __sa_handler.sa_sigaction +#define SA_UNSUPPORTED 0x00000400 +#define SA_EXPOSE_TAGBITS 0x00000800 + struct sigevent { union sigval sigev_value; int sigev_signo; @@ -188,6 +193,7 @@ struct sigevent { #define SIGEV_SIGNAL 0 #define SIGEV_NONE 1 #define SIGEV_THREAD 2 +#define SIGEV_THREAD_ID 4 int __libc_current_sigrtmin(void); int __libc_current_sigrtmax(void); @@ -249,6 +255,9 @@ void (*sigset(int, void (*)(int)))(int); #if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) #define NSIG _NSIG typedef void (*sig_t)(int); + +#define SYS_SECCOMP 1 +#define SYS_USER_DISPATCH 2 #endif #ifdef _GNU_SOURCE diff --git a/porting/liteos_m_iccarm/kernel/include/sys/prctl.h b/porting/liteos_m_iccarm/kernel/include/sys/prctl.h index d9c846e9..087a75c9 100644 --- a/porting/liteos_m_iccarm/kernel/include/sys/prctl.h +++ b/porting/liteos_m_iccarm/kernel/include/sys/prctl.h @@ -157,6 +157,25 @@ struct prctl_mm_map { #define PR_SET_TAGGED_ADDR_CTRL 55 #define PR_GET_TAGGED_ADDR_CTRL 56 #define PR_TAGGED_ADDR_ENABLE (1UL << 0) +#define PR_MTE_TCF_SHIFT 1 +#define PR_MTE_TCF_NONE (0UL << 1) +#define PR_MTE_TCF_SYNC (1UL << 1) +#define PR_MTE_TCF_ASYNC (2UL << 1) +#define PR_MTE_TCF_MASK (3UL << 1) +#define PR_MTE_TAG_SHIFT 3 +#define PR_MTE_TAG_MASK (0xffffUL << 3) + +#define PR_SET_IO_FLUSHER 57 +#define PR_GET_IO_FLUSHER 58 + +#define PR_SET_SYSCALL_USER_DISPATCH 59 +#define PR_SYS_DISPATCH_OFF 0 +#define PR_SYS_DISPATCH_ON 1 +#define SYSCALL_DISPATCH_FILTER_ALLOW 0 +#define SYSCALL_DISPATCH_FILTER_BLOCK 1 + +#define PR_PAC_SET_ENABLED_KEYS 60 +#define PR_PAC_GET_ENABLED_KEYS 61 int prctl (int, ...); diff --git a/porting/liteos_m_iccarm/kernel/include/unistd.h b/porting/liteos_m_iccarm/kernel/include/unistd.h index 4945156a..52e88913 100644 --- a/porting/liteos_m_iccarm/kernel/include/unistd.h +++ b/porting/liteos_m_iccarm/kernel/include/unistd.h @@ -16,6 +16,8 @@ extern "C" { #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 +#define SEEK_DATA 3 +#define SEEK_HOLE 4 #define __NEED_size_t #define __NEED_ssize_t @@ -78,6 +80,7 @@ unsigned sleep(unsigned); int pause(void); pid_t fork(void); +pid_t _Fork(void); int execve(const char *, char *const [], char *const []); int execv(const char *, char *const []); int execle(const char *, const char *, ...); @@ -186,6 +189,7 @@ int syncfs(int); int euidaccess(const char *, int); int eaccess(const char *, int); ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned); +pid_t gettid(void); #endif #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) diff --git a/porting/uniproton/kernel/include/complex.h b/porting/uniproton/kernel/include/complex.h index 788c231d..008b3c7e 100644 --- a/porting/uniproton/kernel/include/complex.h +++ b/porting/uniproton/kernel/include/complex.h @@ -130,5 +130,4 @@ long double creall(long double complex); #ifdef __cplusplus } #endif - #endif diff --git a/porting/uniproton/kernel/include/fenv.h b/porting/uniproton/kernel/include/fenv.h index 39bb3aba..05de990c 100644 --- a/porting/uniproton/kernel/include/fenv.h +++ b/porting/uniproton/kernel/include/fenv.h @@ -24,6 +24,5 @@ int feupdateenv(const fenv_t *); #ifdef __cplusplus } #endif - #endif diff --git a/porting/uniproton/kernel/include/pthread.h b/porting/uniproton/kernel/include/pthread.h index f9fffaa2..86d05681 100644 --- a/porting/uniproton/kernel/include/pthread.h +++ b/porting/uniproton/kernel/include/pthread.h @@ -26,6 +26,7 @@ extern "C" { #define __NEED_size_t #include + #include #include @@ -80,6 +81,9 @@ extern "C" { #define PTHREAD_BARRIER_SERIAL_THREAD (-1) +#define PTHREAD_NULL ((pthread_t)0) + + int pthread_create(pthread_t *__restrict, const pthread_attr_t *__restrict, void *(*)(void *), void *__restrict); int pthread_detach(pthread_t); void pthread_exit(void *); @@ -220,8 +224,8 @@ struct cpu_set_t; int pthread_getaffinity_np(pthread_t, size_t, struct cpu_set_t *); int pthread_setaffinity_np(pthread_t, size_t, const struct cpu_set_t *); int pthread_getattr_np(pthread_t, pthread_attr_t *); -int pthread_getname_np(pthread_t, char *, size_t); int pthread_setname_np(pthread_t, const char *); +int pthread_getname_np(pthread_t, char *, size_t); int pthread_getattr_default_np(pthread_attr_t *); int pthread_setattr_default_np(const pthread_attr_t *); int pthread_tryjoin_np(pthread_t, void **); diff --git a/porting/uniproton/kernel/include/sched.h b/porting/uniproton/kernel/include/sched.h index 605bf91b..49b4561f 100644 --- a/porting/uniproton/kernel/include/sched.h +++ b/porting/uniproton/kernel/include/sched.h @@ -36,6 +36,7 @@ int sched_yield(void); #ifdef _GNU_SOURCE #define CSIGNAL 0x000000ff +#define CLONE_NEWTIME 0x00000080 #define CLONE_VM 0x00000100 #define CLONE_FS 0x00000200 #define CLONE_FILES 0x00000400 diff --git a/porting/uniproton/kernel/include/signal.h b/porting/uniproton/kernel/include/signal.h index 99572f9f..3a0b2e67 100644 --- a/porting/uniproton/kernel/include/signal.h +++ b/porting/uniproton/kernel/include/signal.h @@ -75,6 +75,8 @@ typedef struct sigaltstack stack_t; #define SEGV_ACCERR 2 #define SEGV_BNDERR 3 #define SEGV_PKUERR 4 +#define SEGV_MTEAERR 8 +#define SEGV_MTESERR 9 #define BUS_ADRALN 1 #define BUS_ADRERR 2 @@ -176,6 +178,9 @@ struct sigaction { #define sa_handler __sa_handler.sa_handler #define sa_sigaction __sa_handler.sa_sigaction +#define SA_UNSUPPORTED 0x00000400 +#define SA_EXPOSE_TAGBITS 0x00000800 + struct sigevent { union sigval sigev_value; int sigev_signo; @@ -188,6 +193,7 @@ struct sigevent { #define SIGEV_SIGNAL 0 #define SIGEV_NONE 1 #define SIGEV_THREAD 2 +#define SIGEV_THREAD_ID 4 int __libc_current_sigrtmin(void); int __libc_current_sigrtmax(void); @@ -249,6 +255,9 @@ void (*sigset(int, void (*)(int)))(int); #if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) #define NSIG _NSIG typedef void (*sig_t)(int); + +#define SYS_SECCOMP 1 +#define SYS_USER_DISPATCH 2 #endif #ifdef _GNU_SOURCE diff --git a/porting/uniproton/kernel/include/stdlib.h b/porting/uniproton/kernel/include/stdlib.h index 0a5143df..940f3ddf 100644 --- a/porting/uniproton/kernel/include/stdlib.h +++ b/porting/uniproton/kernel/include/stdlib.h @@ -146,6 +146,8 @@ int getloadavg(double *, int); int clearenv(void); #define WCOREDUMP(s) ((s) & 0x80) #define WIFCONTINUED(s) ((s) == 0xffff) +void *reallocarray (void *, size_t, size_t); +void qsort_r (void *, size_t, size_t, int (*)(const void *, const void *, void *), void *); #endif #ifdef _GNU_SOURCE diff --git a/porting/uniproton/kernel/include/stdnoreturn.h b/porting/uniproton/kernel/include/stdnoreturn.h index 87b302ca..5c6aeeb0 100644 --- a/porting/uniproton/kernel/include/stdnoreturn.h +++ b/porting/uniproton/kernel/include/stdnoreturn.h @@ -1,9 +1,7 @@ #ifndef _STDNORETURN_H #define _STDNORETURN_H - #ifndef __cplusplus #include #define noreturn _Noreturn #endif - #endif diff --git a/porting/uniproton/kernel/include/sys/prctl.h b/porting/uniproton/kernel/include/sys/prctl.h index d9c846e9..087a75c9 100644 --- a/porting/uniproton/kernel/include/sys/prctl.h +++ b/porting/uniproton/kernel/include/sys/prctl.h @@ -157,6 +157,25 @@ struct prctl_mm_map { #define PR_SET_TAGGED_ADDR_CTRL 55 #define PR_GET_TAGGED_ADDR_CTRL 56 #define PR_TAGGED_ADDR_ENABLE (1UL << 0) +#define PR_MTE_TCF_SHIFT 1 +#define PR_MTE_TCF_NONE (0UL << 1) +#define PR_MTE_TCF_SYNC (1UL << 1) +#define PR_MTE_TCF_ASYNC (2UL << 1) +#define PR_MTE_TCF_MASK (3UL << 1) +#define PR_MTE_TAG_SHIFT 3 +#define PR_MTE_TAG_MASK (0xffffUL << 3) + +#define PR_SET_IO_FLUSHER 57 +#define PR_GET_IO_FLUSHER 58 + +#define PR_SET_SYSCALL_USER_DISPATCH 59 +#define PR_SYS_DISPATCH_OFF 0 +#define PR_SYS_DISPATCH_ON 1 +#define SYSCALL_DISPATCH_FILTER_ALLOW 0 +#define SYSCALL_DISPATCH_FILTER_BLOCK 1 + +#define PR_PAC_SET_ENABLED_KEYS 60 +#define PR_PAC_GET_ENABLED_KEYS 61 int prctl (int, ...); diff --git a/porting/uniproton/kernel/include/time.h b/porting/uniproton/kernel/include/time.h index e30667be..02d02948 100644 --- a/porting/uniproton/kernel/include/time.h +++ b/porting/uniproton/kernel/include/time.h @@ -163,4 +163,5 @@ __REDIR(timegm, __timegm_time64); } #endif + #endif diff --git a/porting/uniproton/kernel/include/unistd.h b/porting/uniproton/kernel/include/unistd.h index 4945156a..52e88913 100644 --- a/porting/uniproton/kernel/include/unistd.h +++ b/porting/uniproton/kernel/include/unistd.h @@ -16,6 +16,8 @@ extern "C" { #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 +#define SEEK_DATA 3 +#define SEEK_HOLE 4 #define __NEED_size_t #define __NEED_ssize_t @@ -78,6 +80,7 @@ unsigned sleep(unsigned); int pause(void); pid_t fork(void); +pid_t _Fork(void); int execve(const char *, char *const [], char *const []); int execv(const char *, char *const []); int execle(const char *, const char *, ...); @@ -186,6 +189,7 @@ int syncfs(int); int euidaccess(const char *, int); int eaccess(const char *, int); ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned); +pid_t gettid(void); #endif #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) -- GitLab