diff options
author | Duncan Sands <baldrick@free.fr> | 2010-07-14 14:32:33 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-07-14 14:32:33 +0000 |
commit | 7a68cd094b2f1fc9027d63fab52d2a2cc207e10a (patch) | |
tree | fe205270c6bb0747e034f0c5c07463528f958066 | |
parent | c4d70125eecf97d8edc68d23f9145f03419401d5 (diff) | |
download | bcm5719-llvm-7a68cd094b2f1fc9027d63fab52d2a2cc207e10a.tar.gz bcm5719-llvm-7a68cd094b2f1fc9027d63fab52d2a2cc207e10a.zip |
Rather than using an ifdef on the target to zero out fields,
just use memset to zero the entire struct.
llvm-svn: 108330
-rw-r--r-- | llvm/lib/System/Unix/Program.inc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/System/Unix/Program.inc b/llvm/lib/System/Unix/Program.inc index 67018de812e..0209f5aaf83 100644 --- a/llvm/lib/System/Unix/Program.inc +++ b/llvm/lib/System/Unix/Program.inc @@ -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); } |