From c99c6c0a68bb1c32123a027c274b165b3891e88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Marie?= Date: Fri, 25 Dec 2020 14:31:48 +0000 Subject: [PATCH] openbsd: add commonly used libc wrappers for pledge(2) and unveil(2) --- lib/std/c/openbsd.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/std/c/openbsd.zig b/lib/std/c/openbsd.zig index a1906bc9dd69..04f8b2fcaa5b 100644 --- a/lib/std/c/openbsd.zig +++ b/lib/std/c/openbsd.zig @@ -35,3 +35,6 @@ pub const pthread_attr_t = extern struct { pub const sem_t = ?*opaque {}; pub extern "c" fn posix_memalign(memptr: *?*c_void, alignment: usize, size: usize) c_int; + +pub extern "c" fn pledge(promises: ?[*:0]const u8, execpromises: ?[*:0]const u8) c_int; +pub extern "c" fn unveil(path: ?[*:0]const u8, permissions: ?[*:0]const u8) c_int;