1 Star 0 Fork 0

aosp-riscv/platform-external-minijail

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
syscall_wrapper.c 875 Bytes
一键复制 编辑 原始数据 按行查看 历史
Mike Frysinger 提交于 2018-01-25 00:31 . add seccomp syscall fallbacks
/* Copyright 2016 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "syscall_wrapper.h"
#define _GNU_SOURCE
#include <sys/syscall.h>
#include <unistd.h>
/*
* Older glibc builds predate seccomp inclusion. These arches are the ones
* AOSP needs and doesn't provide anything newer. All other targets can upgrade
* their kernel headers.
*/
#ifndef SYS_seccomp
# if defined(__x86_64__)
# define SYS_seccomp 317
# elif defined(__i386__)
# define SYS_seccomp 354
# elif defined(__aarch64__)
# define SYS_seccomp 277
# elif defined(__arm__)
# define SYS_seccomp 383
# else
# error "Update your kernel headers"
# endif
#endif
int sys_seccomp(unsigned int operation, unsigned int flags, void *args)
{
return syscall(SYS_seccomp, operation, flags, args);
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/aosp-riscv/platform-external-minijail.git
git@gitee.com:aosp-riscv/platform-external-minijail.git
aosp-riscv
platform-external-minijail
platform-external-minijail
riscv64-android-12.0.0_dev

搜索帮助