aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/os
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2018-09-26 03:29:07 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-09-26 03:29:07 +0000
commit201054a7f042f5f175605ca64accb2a812b27bfe (patch)
tree324a23e4c2f0dc50fd84d9525e2f3c6249a4f302 /libgo/go/os
parenta1f9402ebd8935321a013695409772bac5715cde (diff)
downloadgcc-201054a7f042f5f175605ca64accb2a812b27bfe.zip
gcc-201054a7f042f5f175605ca64accb2a812b27bfe.tar.gz
gcc-201054a7f042f5f175605ca64accb2a812b27bfe.tar.bz2
runtime, os: fix the build on Solaris
Reviewed-on: https://go-review.googlesource.com/137535 From-SVN: r264593
Diffstat (limited to 'libgo/go/os')
-rw-r--r--libgo/go/os/executable_solaris.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/libgo/go/os/executable_solaris.go b/libgo/go/os/executable_solaris.go
index b145980..a2ad62a 100644
--- a/libgo/go/os/executable_solaris.go
+++ b/libgo/go/os/executable_solaris.go
@@ -4,14 +4,18 @@
package os
-import "syscall"
+import (
+ "syscall"
+ _ "unsafe" // for go:linkname
+)
-var executablePath string // set by sysauxv in ../runtime/os3_solaris.go
+// solarisExecutablePath is defined in the runtime package.
+func solarisExecutablePath() string
var initCwd, initCwdErr = Getwd()
func executable() (string, error) {
- path := executablePath
+ path := solarisExecutablePath()
if len(path) == 0 {
path, err := syscall.Getexecname()
if err != nil {