forked from OSchip/llvm-project
Rather than using an ifdef on the target to zero out fields,
just use memset to zero the entire struct. llvm-svn: 108330
This commit is contained in:
parent
c4d70125ee
commit
7a68cd094b
|
@ -310,12 +310,9 @@ Program::Wait(unsigned secondsToWait,
|
|||
// fact of having a handler at all causes the wait below to return with EINTR,
|
||||
// unlike if we used SIG_IGN.
|
||||
if (secondsToWait) {
|
||||
#if !defined(__HAIKU__) && !defined(__minix)
|
||||
Act.sa_sigaction = 0;
|
||||
#endif
|
||||
memset(&Act, 0, sizeof(Act));
|
||||
Act.sa_handler = TimeOutHandler;
|
||||
sigemptyset(&Act.sa_mask);
|
||||
Act.sa_flags = 0;
|
||||
sigaction(SIGALRM, &Act, &Old);
|
||||
alarm(secondsToWait);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue