diff options
| author | Sébastien Marie <semarie@online.fr> | 2020-12-25 14:31:48 +0000 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2020-12-25 16:43:14 +0200 |
| commit | c99c6c0a68bb1c32123a027c274b165b3891e88b (patch) | |
| tree | b8bc66ea87c899ec64e9b7a6f93c15f1ce681a16 /lib/std | |
| parent | bc11528b8b7c327c0f6f5a3c97ef45e2a57181cd (diff) | |
| download | zig-c99c6c0a68bb1c32123a027c274b165b3891e88b.tar.gz zig-c99c6c0a68bb1c32123a027c274b165b3891e88b.zip | |
openbsd: add commonly used libc wrappers for pledge(2) and unveil(2)
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/c/openbsd.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/std/c/openbsd.zig b/lib/std/c/openbsd.zig index a1906bc9dd..04f8b2fcaa 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; |
