mirror of
https://github.com/darlinghq/darling.git
synced 2024-12-04 18:46:23 +00:00
Add dummy guarded_* functions that actually do no guarding
This commit is contained in:
parent
a07f054985
commit
fdc3ea4c5a
@ -25,6 +25,9 @@ set(emulation_sources
|
||||
errno.c
|
||||
readline.c
|
||||
common_at.c
|
||||
guarded/guarded_open_np.c
|
||||
guarded/guarded_close_np.c
|
||||
guarded/guarded_kqueue_np.c
|
||||
machdep/machdeps.c
|
||||
machdep/machdep-table.S
|
||||
machdep/tls.c
|
||||
|
12
src/kernel/emulation/linux/guarded/guarded_close_np.c
Normal file
12
src/kernel/emulation/linux/guarded/guarded_close_np.c
Normal file
@ -0,0 +1,12 @@
|
||||
#include "guarded_close_np.h"
|
||||
#include "../base.h"
|
||||
#include "../errno.h"
|
||||
#include <linux-syscalls/linux.h>
|
||||
#include "../unistd/close.h"
|
||||
|
||||
long sys_guarded_close_np(int fd, uint64_t* guardid)
|
||||
{
|
||||
*guardid = 0;
|
||||
return sys_close(fd);
|
||||
}
|
||||
|
8
src/kernel/emulation/linux/guarded/guarded_close_np.h
Normal file
8
src/kernel/emulation/linux/guarded/guarded_close_np.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef LINUX_GUARDED_CLOSE_H
|
||||
#define LINUX_GUARDED_CLOSE_H
|
||||
#include <stdint.h>
|
||||
|
||||
long sys_guarded_close_np(int fd, uint64_t* guardid);
|
||||
|
||||
#endif
|
||||
|
12
src/kernel/emulation/linux/guarded/guarded_kqueue_np.c
Normal file
12
src/kernel/emulation/linux/guarded/guarded_kqueue_np.c
Normal file
@ -0,0 +1,12 @@
|
||||
#include "guarded_kqueue_np.h"
|
||||
#include "../base.h"
|
||||
#include "../errno.h"
|
||||
#include <linux-syscalls/linux.h>
|
||||
#include "../kqueue/kqueue.h"
|
||||
|
||||
long sys_guarded_kqueue_np(uint64_t* guardid, unsigned guardflags)
|
||||
{
|
||||
*guardid = 0;
|
||||
return sys_kqueue();
|
||||
}
|
||||
|
8
src/kernel/emulation/linux/guarded/guarded_kqueue_np.h
Normal file
8
src/kernel/emulation/linux/guarded/guarded_kqueue_np.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef LINUX_GUARDED_KQUEUE_H
|
||||
#define LINUX_GUARDED_KQUEUE_H
|
||||
#include <stdint.h>
|
||||
|
||||
long sys_guarded_kqueue_np(uint64_t* guardid, unsigned guardflags);
|
||||
|
||||
#endif
|
||||
|
12
src/kernel/emulation/linux/guarded/guarded_open_np.c
Normal file
12
src/kernel/emulation/linux/guarded/guarded_open_np.c
Normal file
@ -0,0 +1,12 @@
|
||||
#include "guarded_open_np.h"
|
||||
#include "../base.h"
|
||||
#include "../errno.h"
|
||||
#include <linux-syscalls/linux.h>
|
||||
#include "../fcntl/open.h"
|
||||
|
||||
long sys_guarded_open_np(const char* filename, uint64_t* guardid, unsigned int guardflags, int flags, unsigned int mode)
|
||||
{
|
||||
*guardid = 0;
|
||||
return sys_open(filename, flags, mode);
|
||||
}
|
||||
|
8
src/kernel/emulation/linux/guarded/guarded_open_np.h
Normal file
8
src/kernel/emulation/linux/guarded/guarded_open_np.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef LINUX_GUARDED_OPEN_H
|
||||
#define LINUX_GUARDED_OPEN_H
|
||||
#include <stdint.h>
|
||||
|
||||
long sys_guarded_open_np(const char* filename, uint64_t* guardid, unsigned int guardflags, int flags, unsigned int mode);
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +4,9 @@
|
||||
#include "kqueue/kevent.h"
|
||||
#include "unistd/write.h"
|
||||
#include "unistd/read.h"
|
||||
#include "guarded/guarded_open_np.h"
|
||||
#include "guarded/guarded_close_np.h"
|
||||
#include "guarded/guarded_kqueue_np.h"
|
||||
#include "mman/mman.h"
|
||||
#include "mman/madvise.h"
|
||||
#include "mman/msync.h"
|
||||
@ -361,6 +364,9 @@ void* __bsd_syscall_table[600] = {
|
||||
[415] = sys_pwrite_nocancel,
|
||||
[417] = sys_poll_nocancel,
|
||||
[423] = sys_semwait_signal_nocancel,
|
||||
[441] = sys_guarded_open_np,
|
||||
[442] = sys_guarded_close_np,
|
||||
[443] = sys_guarded_kqueue_np,
|
||||
[461] = sys_getattrlistbulk,
|
||||
[463] = sys_openat,
|
||||
[464] = sys_openat_nocancel,
|
||||
|
Loading…
Reference in New Issue
Block a user