mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix compile errors when building with Android aarch64
PiperOrigin-RevId: 516588240
This commit is contained in:
@@ -26,9 +26,10 @@
|
||||
|
||||
#include "absl/strings/numbers.h"
|
||||
|
||||
#ifndef ANDROID // Conflicts with existing operator<< on Android.
|
||||
|
||||
// Pretty-print a sigset_t.
|
||||
// Pretty-print a sigset_t when it is a struct type.
|
||||
// This is disabled for targets such as Android x86_64, which define sigset_t as
|
||||
// an integral type, to prevent conflicts with the std library.
|
||||
template <typename = std::enable_if<std::is_class<sigset_t>::value>>
|
||||
std::ostream& operator<<(std::ostream& out, const sigset_t& s) {
|
||||
out << "{ ";
|
||||
|
||||
@@ -42,8 +43,6 @@ std::ostream& operator<<(std::ostream& out, const sigset_t& s) {
|
||||
return out;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Verify that the signo handler is handler.
|
||||
int CheckSigHandler(uint32_t signo, uintptr_t handler) {
|
||||
struct sigaction sa;
|
||||
|
||||
@@ -114,8 +114,8 @@ TEST(FPSigTest, Fork) {
|
||||
"mov x0, %1\n"
|
||||
"mov x1, %2\n"
|
||||
"mov x2, %3\n"
|
||||
"svc #0\n" ::"r"(__NR_tgkill),
|
||||
"r"(parent), "r"(parent_tid), "r"(SIGUSR1));
|
||||
"svc #0\n" ::"N"(__NR_tgkill),
|
||||
"r"((uint64_t)parent), "r"((uint64_t)parent_tid), "N"(SIGUSR1));
|
||||
#endif
|
||||
|
||||
uint64_t got;
|
||||
|
||||
@@ -86,8 +86,8 @@ void sigusr1(int s, siginfo_t* siginfo, void* _uc) {
|
||||
"mov x0, %1\n"
|
||||
"mov x1, %2\n"
|
||||
"mov x2, %3\n"
|
||||
"svc #0\n" ::"r"(__NR_tgkill),
|
||||
"r"(pid), "r"(tid), "r"(SIGUSR2));
|
||||
"svc #0\n" ::"N"(__NR_tgkill),
|
||||
"r"((uint64_t)pid), "r"((uint64_t)tid), "N"(SIGUSR2));
|
||||
#endif
|
||||
|
||||
// Record value of %xmm0 again to verify that the nested signal handler
|
||||
@@ -142,8 +142,8 @@ TEST(FPSigTest, NestedSignals) {
|
||||
"mov x0, %1\n"
|
||||
"mov x1, %2\n"
|
||||
"mov x2, %3\n"
|
||||
"svc #0\n" ::"r"(__NR_tgkill),
|
||||
"r"(pid), "r"(tid), "r"(SIGUSR1));
|
||||
"svc #0\n" ::"N"(__NR_tgkill),
|
||||
"r"((uint64_t)pid), "r"((uint64_t)tid), "N"(SIGUSR1));
|
||||
#endif
|
||||
|
||||
uint64_t got;
|
||||
|
||||
Reference in New Issue
Block a user