Guard against syscalls not available on some platforms
AbandonedPublic

Authored by davidk on Jan 5 2018, 7:21 AM.

Details

Reviewers
bshah
graesslin
Summary

The seccomp test fails on aarch64 since commit
7720e84863377d5d1a2a20feb76d50df505ca680 because some syscalls are not
available.

This is because we check for all syscalls at once (for clarity
reasons) and are using #error if a syscall is not available. As #error doesn't
abort compilation, we get a "not declared in scope" error when using the
syscalls.

Instead, guard each syscall separate.

Test Plan

works on my AMD64 system as before. I don't own an arm64 system

to test the change.

Diff Detail

Repository
R133 KScreenLocker
Branch
protectSyscalls
Lint
No Linters Available
Unit
No Unit Test Coverage
davidk created this revision.Jan 5 2018, 7:21 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 5 2018, 7:21 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidk requested review of this revision.Jan 5 2018, 7:21 AM
bshah added a comment.Jan 5 2018, 7:25 AM

Uh, sorry I forgot to mention in orignial PR: but https://phabricator.kde.org/D9225

davidk abandoned this revision.Jan 5 2018, 7:35 AM
In D9673#186294, @bshah wrote:

Uh, sorry I forgot to mention in orignial PR: but https://phabricator.kde.org/D9225

Ok, no problem. I'll close this one.