mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
Build and memSize impl for Solaris
This commit is contained in:
parent
5a98f4e47c
commit
12eda0449a
2
build.sh
2
build.sh
@ -142,7 +142,7 @@ case "$1" in
|
||||
godep go build ./cmd/stpidx
|
||||
godep go build ./cmd/stcli
|
||||
|
||||
for os in darwin-amd64 linux-386 linux-amd64 freebsd-amd64 windows-amd64 windows-386 ; do
|
||||
for os in darwin-amd64 linux-386 linux-amd64 freebsd-amd64 windows-amd64 windows-386 solaris-amd64 ; do
|
||||
export GOOS=${os%-*}
|
||||
export GOARCH=${os#*-}
|
||||
|
||||
|
20
cmd/syncthing/memsize_solaris.go
Normal file
20
cmd/syncthing/memsize_solaris.go
Normal file
@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func memorySize() (uint64, error) {
|
||||
cmd := exec.Command("prtconf", "-m")
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
mb, err := strconv.ParseUint(string(out), 10, 64)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return mb * 1024 * 1024, nil
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
// +build freebsd solaris
|
||||
// +build freebsd
|
||||
|
||||
package main
|
||||
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by an MIT-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// +build !solaris
|
||||
|
||||
package main
|
||||
|
||||
import (
|
9
cmd/syncthing/upgrade_unsupp.go
Normal file
9
cmd/syncthing/upgrade_unsupp.go
Normal file
@ -0,0 +1,9 @@
|
||||
// +build windows solaris
|
||||
|
||||
package main
|
||||
|
||||
import "errors"
|
||||
|
||||
func upgrade() error {
|
||||
return errors.New("Upgrade currently unsupported on Windows")
|
||||
}
|
BIN
files/testdata/index.db
vendored
Normal file
BIN
files/testdata/index.db
vendored
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user