From 691c2f8173dfe7349e8289697299839cda32b495 Mon Sep 17 00:00:00 2001 From: Rahat Mahmood Date: Mon, 12 Aug 2019 17:33:26 -0700 Subject: Compute size of struct tcp_info instead of hardcoding it. PiperOrigin-RevId: 263040624 --- pkg/abi/linux/socket.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') 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 ( -- cgit v1.2.3