summaryrefslogtreecommitdiff
path: root/misc/cgo/testcdefs/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'misc/cgo/testcdefs/main.go')
-rw-r--r--misc/cgo/testcdefs/main.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/misc/cgo/testcdefs/main.go b/misc/cgo/testcdefs/main.go
index 864b4b2a7..9231741ad 100644
--- a/misc/cgo/testcdefs/main.go
+++ b/misc/cgo/testcdefs/main.go
@@ -2,7 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package cgotest
+package main
-// This file only exists so we can run 'go build' and build our .c files
-func test() {}
+import "os"
+
+func test() int32 // in main.c
+
+func main() {
+ os.Exit(int(test()))
+}