From 595bc63e8fb9636bb89c0cff3f879467d3c06988 Mon Sep 17 00:00:00 2001 From: Ali Rizvi-Santiago Date: Mon, 12 Nov 2018 21:54:16 +0000 Subject: [PATCH] runtime/cgo: added missing includes for errno.h to the windows gcc stubs. This adds the includes for errno.h to the windows stubs for runtime/cgo so that "errno" is properly declared. Due to "errno" not being properly declared, the compiler is forced to assume it's an external which leaves it up to the linker. This is an issue in some implementations as errno might be a macro which results in an unresolved symbol error during linking. runtime/cgo/gcc_libinit_windows.c: added include runtime/cgo/gcc_windows_386.c: added include runtime/cgo/gcc_windows_amd64.c: added include Change-Id: I77167d02f7409462979135efc55cf50bbc6bd363 GitHub-Last-Rev: 90da06ee3cbec3f51c6d31185868bb70341ce9d3 GitHub-Pull-Request: golang/go#28747 Reviewed-on: https://go-review.googlesource.com/c/149118 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- src/runtime/cgo/gcc_libinit_windows.c | 1 + src/runtime/cgo/gcc_windows_386.c | 1 + src/runtime/cgo/gcc_windows_amd64.c | 1 + 3 files changed, 3 insertions(+) diff --git a/src/runtime/cgo/gcc_libinit_windows.c b/src/runtime/cgo/gcc_libinit_windows.c index b6f51b3e4dd..248d59fd695 100644 --- a/src/runtime/cgo/gcc_libinit_windows.c +++ b/src/runtime/cgo/gcc_libinit_windows.c @@ -9,6 +9,7 @@ #include #include +#include #include "libcgo.h" diff --git a/src/runtime/cgo/gcc_windows_386.c b/src/runtime/cgo/gcc_windows_386.c index f2ff710f60c..9184b91393f 100644 --- a/src/runtime/cgo/gcc_windows_386.c +++ b/src/runtime/cgo/gcc_windows_386.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "libcgo.h" static void threadentry(void*); diff --git a/src/runtime/cgo/gcc_windows_amd64.c b/src/runtime/cgo/gcc_windows_amd64.c index 511ab44fa98..7192a246315 100644 --- a/src/runtime/cgo/gcc_windows_amd64.c +++ b/src/runtime/cgo/gcc_windows_amd64.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "libcgo.h" static void threadentry(void*);