From f7a8adbd511e921111fc0682d380a6f7a33e0c93 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Tue, 5 Aug 2014 18:12:32 -0700 Subject: cmd/cgo: fix handling of defs_linux.go Instead of including to get size_t, instead include the ISO C standard header, which defines fewer additional types at risk of colliding with the user code. In particular, this prevents collisions between 's userspace definitions with the kernel definitions needed by defs_linux.go. Also, -cdefs mode uses #pragma pack, so we can keep misaligned fields. Fixes #8477. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://golang.org/cl/120610043 --- src/pkg/runtime/defs_linux.go | 1 + 1 file changed, 1 insertion(+) (limited to 'src/pkg/runtime') diff --git a/src/pkg/runtime/defs_linux.go b/src/pkg/runtime/defs_linux.go index 2f4e03a016..8657dbb0ec 100644 --- a/src/pkg/runtime/defs_linux.go +++ b/src/pkg/runtime/defs_linux.go @@ -28,6 +28,7 @@ package runtime #include #include #include +#undef size_t */ import "C" -- cgit v1.3-5-g9baa