1
0
mirror of https://github.com/golang/go synced 2024-09-25 11:20:13 -06:00

runtime/cgo: add cgo build tag to C files

This makes "CGO_ENABLED=0 go list runtime/cgo" work,
which fixes the current cmd/go test failure.

Change-Id: Ia55ce3ba1dbb09f618ae5f4c8547722670360f59
Reviewed-on: https://go-review.googlesource.com/19001
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Russ Cox 2016-01-27 15:58:52 -05:00
parent 572f7660a7
commit e3f3f940a0
4 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build cgo
#include <string.h> /* for strerror */
#include <pthread.h>
#include <signal.h>

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build cgo
// +build darwin dragonfly freebsd linux netbsd solaris
// +build !ppc64,!ppc64le

View File

@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build cgo
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
#include "libcgo.h"

View File

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build cgo
#include "libcgo.h"
/* Stub for calling malloc from Go */