| ... | ... | @@ -2632,6 +2632,7 @@ pub const libc = struct { |
| 2632 | 2632 | pub extern fn __errno_location() *c_int; |
| 2633 | 2633 | pub extern fn gettid() pid_t; |
| 2634 | 2634 | pub extern fn accept4(socket: c_int, noalias address: ?*struct_sockaddr, noalias address_len: *socklen_t, flags: c_int) c_int; |
| 2635 | pub extern fn memfd_create(name: [*:0]const u8, flags: c_uint) c_int; |
| 2635 | 2636 | }; |
| 2636 | 2637 | |
| 2637 | 2638 | pub const clock_t = c_long; |
| ... | ... | @@ -3130,3 +3131,9 @@ pub fn clock_gettime(clock_id: clockid_t) !struct_timespec { |
| 3130 | 3131 | std.debug.assert(rc == 0); |
| 3131 | 3132 | return tp; |
| 3132 | 3133 | } |
| 3134 | pub fn memfd_create(name: [*:0]const u8, flags: c_uint) !c_int { |
| 3135 | const rc = libc.memfd_create(name, flags); |
| 3136 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 3137 | std.debug.assert(rc >= 0); |
| 3138 | return rc; |
| 3139 | } |