mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Add C++ toolchain and fix compile issues.
This was accidentally introduced in 31f05d5d4f.
Fixes #788.
PiperOrigin-RevId: 266462843
This commit is contained in:
committed by
gVisor bot
parent
f74affe203
commit
888e87909e
@@ -32,6 +32,17 @@ load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
|
||||
|
||||
gazelle_dependencies()
|
||||
|
||||
# Load C++ rules.
|
||||
http_archive(
|
||||
name = "rules_cc",
|
||||
sha256 = "67412176974bfce3f4cf8bdaff39784a72ed709fc58def599d1f68710b58d68b",
|
||||
strip_prefix = "rules_cc-b7fe9697c0c76ab2fd431a891dbb9a6a32ed7c3e",
|
||||
urls = [
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b7fe9697c0c76ab2fd431a891dbb9a6a32ed7c3e.zip",
|
||||
"https://github.com/bazelbuild/rules_cc/archive/b7fe9697c0c76ab2fd431a891dbb9a6a32ed7c3e.zip",
|
||||
],
|
||||
)
|
||||
|
||||
# Load protobuf dependencies.
|
||||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
||||
|
||||
|
||||
@@ -1213,6 +1213,7 @@ cc_binary(
|
||||
"//test/util:test_main",
|
||||
"//test/util:test_util",
|
||||
"//test/util:thread_util",
|
||||
"@com_google_absl//absl/memory",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_googletest//:gtest",
|
||||
],
|
||||
@@ -3362,6 +3363,7 @@ cc_binary(
|
||||
"//test/util:test_util",
|
||||
"//test/util:thread_util",
|
||||
"@com_google_absl//absl/base:core_headers",
|
||||
"@com_google_absl//absl/memory",
|
||||
"@com_google_absl//absl/synchronization",
|
||||
"@com_google_absl//absl/time",
|
||||
"@com_google_googletest//:gtest",
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/memory/memory.h"
|
||||
#include "test/syscalls/linux/file_base.h"
|
||||
#include "test/util/capability_util.h"
|
||||
#include "test/util/cleanup.h"
|
||||
|
||||
@@ -1292,10 +1292,8 @@ TEST_F(JobControlTest, ReleaseTTY) {
|
||||
|
||||
// Make sure we're ignoring SIGHUP, which will be sent to this process once we
|
||||
// disconnect they TTY.
|
||||
struct sigaction sa = {
|
||||
.sa_handler = SIG_IGN,
|
||||
.sa_flags = 0,
|
||||
};
|
||||
struct sigaction sa = {};
|
||||
sa.sa_handler = SIG_IGN;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
struct sigaction old_sa;
|
||||
EXPECT_THAT(sigaction(SIGHUP, &sa, &old_sa), SyscallSucceeds());
|
||||
@@ -1362,10 +1360,8 @@ TEST_F(JobControlTest, ReleaseTTYSignals) {
|
||||
ASSERT_THAT(ioctl(slave_.get(), TIOCSCTTY, 0), SyscallSucceeds());
|
||||
|
||||
received = 0;
|
||||
struct sigaction sa = {
|
||||
.sa_handler = sig_handler,
|
||||
.sa_flags = 0,
|
||||
};
|
||||
struct sigaction sa = {};
|
||||
sa.sa_handler = sig_handler;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sigaddset(&sa.sa_mask, SIGHUP);
|
||||
sigaddset(&sa.sa_mask, SIGCONT);
|
||||
@@ -1403,10 +1399,8 @@ TEST_F(JobControlTest, ReleaseTTYSignals) {
|
||||
|
||||
// Make sure we're ignoring SIGHUP, which will be sent to this process once we
|
||||
// disconnect they TTY.
|
||||
struct sigaction sighup_sa = {
|
||||
.sa_handler = SIG_IGN,
|
||||
.sa_flags = 0,
|
||||
};
|
||||
struct sigaction sighup_sa = {};
|
||||
sighup_sa.sa_handler = SIG_IGN;
|
||||
sigemptyset(&sighup_sa.sa_mask);
|
||||
struct sigaction old_sa;
|
||||
EXPECT_THAT(sigaction(SIGHUP, &sighup_sa, &old_sa), SyscallSucceeds());
|
||||
@@ -1456,10 +1450,8 @@ TEST_F(JobControlTest, SetForegroundProcessGroup) {
|
||||
ASSERT_THAT(ioctl(slave_.get(), TIOCSCTTY, 0), SyscallSucceeds());
|
||||
|
||||
// Ignore SIGTTOU so that we don't stop ourself when calling tcsetpgrp.
|
||||
struct sigaction sa = {
|
||||
.sa_handler = SIG_IGN,
|
||||
.sa_flags = 0,
|
||||
};
|
||||
struct sigaction sa = {};
|
||||
sa.sa_handler = SIG_IGN;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sigaction(SIGTTOU, &sa, NULL);
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/sem.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <cerrno>
|
||||
#include <ctime>
|
||||
@@ -22,6 +23,7 @@
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/base/macros.h"
|
||||
#include "absl/memory/memory.h"
|
||||
#include "absl/synchronization/mutex.h"
|
||||
#include "absl/time/clock.h"
|
||||
#include "test/util/capability_util.h"
|
||||
|
||||
Reference in New Issue
Block a user