Magisk/native/jni/utils/missing.hpp

14 lines
332 B
C++
Raw Normal View History

2019-06-23 14:54:48 -07:00
#pragma once
#include <sys/syscall.h>
#include <unistd.h>
2021-10-20 03:17:42 -07:00
static inline int sigtimedwait(const sigset_t* set, siginfo_t* info, const timespec* timeout) {
2021-08-21 03:52:59 -07:00
union {
sigset_t set;
sigset_t set64;
} s{};
s.set = *set;
return syscall(__NR_rt_sigtimedwait, &s.set64, info, timeout, sizeof(sigset64_t));
}