diff options
author | Yuce Tekol <yucetekol@gmail.com> | 2019-05-03 02:10:00 +0300 |
---|---|---|
committer | Yuce Tekol <yucetekol@gmail.com> | 2019-05-03 02:10:00 +0300 |
commit | a0bd7adde20e1b89768b3784aeb9c03e851d7c70 (patch) | |
tree | b52f0d1f3f4c8ed4a16c441dd37913cf1c744212 /openbsd/openbsd_builder.py | |
download | pyopenbsd-a0bd7adde20e1b89768b3784aeb9c03e851d7c70.tar.gz |
initial commit
Diffstat (limited to 'openbsd/openbsd_builder.py')
-rw-r--r-- | openbsd/openbsd_builder.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/openbsd/openbsd_builder.py b/openbsd/openbsd_builder.py new file mode 100644 index 0000000..8ca0bc5 --- /dev/null +++ b/openbsd/openbsd_builder.py @@ -0,0 +1,20 @@ + +from cffi import FFI +ffibuilder = FFI() + +ffibuilder.cdef(''' + int pledge(const char *promises, const char *execpromises); + int unveil(const char *path, const char *permissions); + char *strerror(int errnum); +''') + +ffibuilder.set_source("_openbsd", +""" + #include <unistd.h> + #include <string.h> +""") + +if __name__ == "__main__": + ffibuilder.compile(verbose=True) + + |