aboutsummaryrefslogtreecommitdiff
path: root/libgo/sysinfo.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2016-11-18 00:15:38 +0000
committerIan Lance Taylor <iant@golang.org>2016-11-18 00:15:38 +0000
commit5ff1d191dcabe0bb3efd7be97f9cbc54833b9074 (patch)
tree67be8f93c3e7e9a2a592f5932622a54083146948 /libgo/sysinfo.c
parentf81e435716e2222feaf78bff10c449afeb432908 (diff)
runtime, reflect: rewrite Go to FFI type conversion in Go
As we move toward the Go 1.7 garbage collector, it's essential that all allocation of values that can contain Go pointers be done using the correct type descriptor. That is simplest if we do all such allocation in Go code. This rewrites the code that converts from a Go type to a libffi CIF into Go. Reviewed-on: https://go-review.googlesource.com/33353 git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@242578 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/sysinfo.c')
-rw-r--r--libgo/sysinfo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
index 56790c60415..235941b6211 100644
--- a/libgo/sysinfo.c
+++ b/libgo/sysinfo.c
@@ -163,6 +163,10 @@
#include <port.h>
#endif
+#ifdef USE_LIBFFI
+#include "ffi.h"
+#endif
+
/* Constants that may only be defined as expressions on some systems,
expressions too complex for -fdump-go-spec to handle. These are
handled specially below. */