diff options
author | Rahat Mahmood <rahat@google.com> | 2019-08-12 17:33:26 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-08-12 17:34:38 -0700 |
commit | 691c2f8173dfe7349e8289697299839cda32b495 (patch) | |
tree | 0b9ac8bdddc1587f1c786f2554786d8f1a7bd880 /pkg/abi/linux/socket.go | |
parent | eac690e358e25897bb878fdfd1ad7036054162e2 (diff) |
Compute size of struct tcp_info instead of hardcoding it.
PiperOrigin-RevId: 263040624
Diffstat (limited to 'pkg/abi/linux/socket.go')
-rw-r--r-- | pkg/abi/linux/socket.go | 2 |
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 ( |