Fix build on Windows #2.

This commit is contained in:
John Preston 2021-05-03 23:05:22 +04:00
parent 8332ba8450
commit 5ce1b00291
1 changed files with 6 additions and 6 deletions

View File

@ -202,8 +202,8 @@ const int HandledSignals[] = {
struct sigaction OldSigActions[32]/* = { 0 }*/; struct sigaction OldSigActions[32]/* = { 0 }*/;
void RestoreSignalHandlers() { void RestoreSignalHandlers() {
for (const auto signal : HandledSignals) { for (const auto signum : HandledSignals) {
sigaction(signal, &OldSigActions[signal], nullptr); sigaction(signum, &OldSigActions[signal], nullptr);
} }
} }
@ -445,12 +445,12 @@ Status Restart() {
sigemptyset(&sigact.sa_mask); sigemptyset(&sigact.sa_mask);
sigact.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO; sigact.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
for (const auto signal : HandledSignals) { for (const auto signum : HandledSignals) {
sigaction(signal, &sigact, &OldSigActions[signal]); sigaction(signum, &sigact, &OldSigActions[signal]);
} }
#else // !Q_OS_WIN #else // !Q_OS_WIN
for (const auto signal : HandledSignals) { for (const auto signum : HandledSignals) {
signal(signal, SignalHandler); signal(signum, SignalHandler);
} }
#endif // else for !Q_OS_WIN #endif // else for !Q_OS_WIN
} }