summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorRahat Mahmood <rahat@google.com>2019-08-12 17:33:26 -0700
committergVisor bot <gvisor-bot@google.com>2019-08-12 17:34:38 -0700
commit691c2f8173dfe7349e8289697299839cda32b495 (patch)
tree0b9ac8bdddc1587f1c786f2554786d8f1a7bd880 /pkg
parenteac690e358e25897bb878fdfd1ad7036054162e2 (diff)
Compute size of struct tcp_info instead of hardcoding it.
PiperOrigin-RevId: 263040624
Diffstat (limited to 'pkg')
-rw-r--r--pkg/abi/linux/socket.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/abi/linux/socket.go b/pkg/abi/linux/socket.go
index e53165622..6857a20a3 100644
--- a/pkg/abi/linux/socket.go
+++ b/pkg/abi/linux/socket.go
@@ -366,7 +366,7 @@ type TCPInfo struct {
}
// SizeOfTCPInfo is the binary size of a TCPInfo struct.
-const SizeOfTCPInfo = 104
+var SizeOfTCPInfo = int(binary.Size(TCPInfo{}))
// Control message types, from linux/socket.h.
const (