Skip to content

Commit

Permalink
openbsd: add commonly used libc wrappers for pledge(2) and unveil(2)
Browse files Browse the repository at this point in the history
  • Loading branch information
semarie authored and Vexu committed Dec 25, 2020
1 parent bc11528 commit c99c6c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/std/c/openbsd.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit c99c6c0

Please sign in to comment.