Skip to content

Commit 021289a

Browse files
ruihe774alexrp
authored andcommitted
linux: make ptid and ctid in clone() optional
1 parent ec60156 commit 021289a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/std/os/linux.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,19 @@ pub fn clone(
7171
stack: usize,
7272
flags: u32,
7373
arg: usize,
74-
ptid: *i32,
74+
ptid: ?*i32,
7575
tp: usize, // aka tls
76-
ctid: *i32,
76+
ctid: ?*i32,
7777
) usize {
7878
// Can't directly call a naked function; cast to C calling convention first.
7979
return @as(*const fn (
8080
*const fn (arg: usize) callconv(.C) u8,
8181
usize,
8282
u32,
8383
usize,
84-
*i32,
84+
?*i32,
8585
usize,
86-
*i32,
86+
?*i32,
8787
) callconv(.C) usize, @ptrCast(&syscall_bits.clone))(func, stack, flags, arg, ptid, tp, ctid);
8888
}
8989

0 commit comments

Comments
 (0)