summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-02-14 12:07:08 -0800
committergVisor bot <gvisor-bot@google.com>2020-02-14 12:08:12 -0800
commit3c26f5ecb0087337b1f194b6d429ce68f3af70eb (patch)
tree1412498695e5797ed90147540fb232a2ed67be6f /pkg/abi
parent4075de11be44372c454aae7f9650cdc814c52229 (diff)
Enable automated marshalling for struct stat.
This requires fixing a few build issues for non-am64 platforms. PiperOrigin-RevId: 295196922
Diffstat (limited to 'pkg/abi')
-rw-r--r--pkg/abi/linux/BUILD1
-rw-r--r--pkg/abi/linux/file_amd64.go2
-rw-r--r--pkg/abi/linux/file_arm64.go2
-rw-r--r--pkg/abi/linux/time.go2
4 files changed, 7 insertions, 0 deletions
diff --git a/pkg/abi/linux/BUILD b/pkg/abi/linux/BUILD
index 1f3c0c687..b7015367b 100644
--- a/pkg/abi/linux/BUILD
+++ b/pkg/abi/linux/BUILD
@@ -59,6 +59,7 @@ go_library(
"wait.go",
"xattr.go",
],
+ marshal = True,
visibility = ["//visibility:public"],
deps = [
"//pkg/abi",
diff --git a/pkg/abi/linux/file_amd64.go b/pkg/abi/linux/file_amd64.go
index 8693d49c8..6b72364ea 100644
--- a/pkg/abi/linux/file_amd64.go
+++ b/pkg/abi/linux/file_amd64.go
@@ -25,6 +25,8 @@ const (
)
// Stat represents struct stat.
+//
+// +marshal
type Stat struct {
Dev uint64
Ino uint64
diff --git a/pkg/abi/linux/file_arm64.go b/pkg/abi/linux/file_arm64.go
index ea3adc5f5..6492c9038 100644
--- a/pkg/abi/linux/file_arm64.go
+++ b/pkg/abi/linux/file_arm64.go
@@ -25,6 +25,8 @@ const (
)
// Stat represents struct stat.
+//
+// +marshal
type Stat struct {
Dev uint64
Ino uint64
diff --git a/pkg/abi/linux/time.go b/pkg/abi/linux/time.go
index 5c5a58cd4..e562b46d9 100644
--- a/pkg/abi/linux/time.go
+++ b/pkg/abi/linux/time.go
@@ -101,6 +101,8 @@ func NsecToTimeT(nsec int64) TimeT {
}
// Timespec represents struct timespec in <time.h>.
+//
+// +marshal
type Timespec struct {
Sec int64
Nsec int64