fix: use VaList::next_arg for variadic sem_open

This commit is contained in:
Red Bear OS
2026-07-06 00:01:26 +03:00
parent 3e4dbfbe7a
commit 85a7ea0396
+4 -1
View File
@@ -158,7 +158,10 @@ pub unsafe extern "C" fn sem_open(
return ptr as *mut NamedSemaphore as *mut sem_t;
}
let (mode, value): (mode_t, c_uint) = if create {
(unsafe { __valist.arg::<mode_t>() }, unsafe { __valist.arg::<c_uint>() })
(
unsafe { __valist.next_arg::<mode_t>() }.unwrap_or(0),
unsafe { __valist.next_arg::<c_uint>() }.unwrap_or(0),
)
} else {
(0, 0)
};