fix build failed on aarch64 (#1132)

This commit is contained in:
Lunny Xiao 2017-03-07 15:09:05 +08:00 committed by GitHub
parent 848293671b
commit fa41ddd3eb
4 changed files with 24 additions and 6 deletions

18
vendor/github.com/ngaut/log/crash_darwin.go generated vendored Normal file
View File

@ -0,0 +1,18 @@
// +build darwin
package log
import (
"log"
"os"
"syscall"
)
func CrashLog(file string) {
f, err := os.OpenFile(file, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
log.Println(err.Error())
} else {
syscall.Dup2(int(f.Fd()), 2)
}
}

View File

@ -1,4 +1,4 @@
// +build freebsd openbsd netbsd dragonfly darwin linux // +build freebsd openbsd netbsd dragonfly linux
package log package log
@ -13,6 +13,6 @@ func CrashLog(file string) {
if err != nil { if err != nil {
log.Println(err.Error()) log.Println(err.Error())
} else { } else {
syscall.Dup2(int(f.Fd()), 2) syscall.Dup3(int(f.Fd()), 2, 0)
} }
} }

2
vendor/github.com/ngaut/log/log.go generated vendored
View File

@ -372,7 +372,7 @@ func genHourTime(t time.Time) string {
} }
func New() *logger { func New() *logger {
return Newlogger(os.Stdout, "") return Newlogger(os.Stderr, "")
} }
func Newlogger(w io.Writer, prefix string) *logger { func Newlogger(w io.Writer, prefix string) *logger {

6
vendor/vendor.json vendored
View File

@ -611,10 +611,10 @@
"revisionTime": "2015-08-13T08:49:40Z" "revisionTime": "2015-08-13T08:49:40Z"
}, },
{ {
"checksumSHA1": "wLXFUHpjYiigLxib/vQZ6RcMM34=", "checksumSHA1": "94Mvr/SU9I9Zl3pBtbHsBPN0LTg=",
"path": "github.com/ngaut/log", "path": "github.com/ngaut/log",
"revision": "37d3e0f43b4fe05429e1adb75e835bf31fc1bba6", "revision": "d2af3a61f64d093457fb23b25d20f4ce3cd551ce",
"revisionTime": "2015-09-18T08:53:30Z" "revisionTime": "2017-03-07T01:10:05Z"
}, },
{ {
"checksumSHA1": "EcKjGj2rrdhMK90WMmP5gGwGQt8=", "checksumSHA1": "EcKjGj2rrdhMK90WMmP5gGwGQt8=",