]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/cgo: added missing includes for errno.h to the windows gcc stubs.
authorAli Rizvi-Santiago <arizvisa@gmail.com>
Mon, 12 Nov 2018 21:54:16 +0000 (21:54 +0000)
committerIan Lance Taylor <iant@golang.org>
Mon, 12 Nov 2018 23:05:28 +0000 (23:05 +0000)
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 <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/cgo/gcc_libinit_windows.c
src/runtime/cgo/gcc_windows_386.c
src/runtime/cgo/gcc_windows_amd64.c

index b6f51b3e4dd66f70c995f4edfa23b92b8f54bd4d..248d59fd6957430b06d12fdf962396c926e44f29 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <errno.h>
 
 #include "libcgo.h"
 
index f2ff710f60cdf826ef619d9570bdc745d0d2ea67..9184b91393ff59459c3069d2029404bbb6dd99d6 100644 (file)
@@ -7,6 +7,7 @@
 #include <process.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <errno.h>
 #include "libcgo.h"
 
 static void threadentry(void*);
index 511ab44fa9822fe59c1fb18afeb01f00f3ff65a7..7192a2463154387fced551009329b031b550024e 100644 (file)
@@ -7,6 +7,7 @@
 #include <process.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <errno.h>
 #include "libcgo.h"
 
 static void threadentry(void*);