authorgravatar for kcbanner@gmail.comCasey Banner <kcbanner@gmail.com> 2023-07-01 10:43:34-04:00
committergravatar for kcbanner@gmail.comCasey Banner <kcbanner@gmail.com> 2023-07-20 22:58:14-04:00
log7bc1695f15e83bb7e0e1401d2411660b05ab65e3
tree5b93c6a9798991035093ce09dd71ee93cdecedb2
parent9c908ea814b6b5ae67622c0a9cce4704c6734590

c: musl doesn't implement getcontext, so defer to our implementation in that case


1 files changed, 6 insertions(+), 1 deletions(-)

lib/std/c.zig+6-1
...@@ -413,7 +413,12 @@ pub extern "c" fn timer_delete(timerid: c.timer_t) c_int;...@@ -413,7 +413,12 @@ pub extern "c" fn timer_delete(timerid: c.timer_t) c_int;
413pub extern "c" fn timer_settime(timerid: c.timer_t, flags: c_int, new_value: *const c.itimerspec, old_value: *c.itimerspec) c_int;413pub extern "c" fn timer_settime(timerid: c.timer_t, flags: c_int, new_value: *const c.itimerspec, old_value: *c.itimerspec) c_int;
414pub extern "c" fn timer_gettime(timerid: c.timer_t, flags: c_int, curr_value: *c.itimerspec) c_int;414pub extern "c" fn timer_gettime(timerid: c.timer_t, flags: c_int, curr_value: *c.itimerspec) c_int;
415415
416pub extern "c" fn getcontext(ucp: *std.os.ucontext_t) c_int;416pub usingnamespace if (builtin.os.tag == .linux and builtin.target.isMusl()) struct {
417 // musl does not implement getcontext
418 const getcontext = std.os.linux.getcontext;
419} else struct {
420 extern "c" fn getcontext(ucp: *std.os.ucontext_t) c_int;
421};
417422
418pub const max_align_t = if (builtin.abi == .msvc)423pub const max_align_t = if (builtin.abi == .msvc)
419 f64424 f64