From: Rico Tzschichholz Date: Wed, 23 Oct 2019 20:50:22 +0000 (+0200) Subject: linux: Add memfd_create(2) X-Git-Tag: 0.47.1~39 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b41694a099ed010c480d1aa72d507a050ebeb058;p=thirdparty%2Fvala.git linux: Add memfd_create(2) --- diff --git a/vapi/linux.vapi b/vapi/linux.vapi index 29838e876..344f62463 100644 --- a/vapi/linux.vapi +++ b/vapi/linux.vapi @@ -1280,6 +1280,17 @@ namespace Linux { [CCode (cheader_filename = "sys/mman.h")] public void *mremap (void *old_address, size_t old_size, size_t new_size, MremapFlags flags); + // memfd_create(2) + [CCode (cname = "unsigned int", cheader_filename = "linux/memfd.h", cprefix = "MFD_", has_type_id = false)] + public enum MemfdFlags { + CLOEXEC, + ALLOW_SEALING, + HUGETLB + } + + [CCode (cheader_filename = "sys/mman.h", feature_test_macro = "_GNU_SOURCE")] + public int memfd_create (string name, MemfdFlags flags); + /* * Network */