summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorLokesh Mandvekar <lsm5@fedoraproject.org>2020-09-22 16:24:23 -0400
committerLokesh Mandvekar <lsm5@fedoraproject.org>2020-09-22 17:14:07 -0400
commit1cc9cd704d949db557dbdb4aa32f373361d80af2 (patch)
tree523ba4b958571dfc7e72cb94d259cec247bc6f4b /pkg
parentd8868746fd3f45b9bfd79e37bf2aa0c7103245fd (diff)
downloadpodman-1cc9cd704d949db557dbdb4aa32f373361d80af2.tar.gz
podman-1cc9cd704d949db557dbdb4aa32f373361d80af2.tar.bz2
podman-1cc9cd704d949db557dbdb4aa32f373361d80af2.zip
fix build with varlink
also add a cirrus task for building binaries with varlink. From: Chris Evich <cevich@redhat.com> Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org> (cherry picked from commit 16763c3df0eaf3b6e5b7883c60b59f051f811cda) Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/varlinkapi/system.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/varlinkapi/system.go b/pkg/varlinkapi/system.go
index 9e4db2611..e5c766a6d 100644
--- a/pkg/varlinkapi/system.go
+++ b/pkg/varlinkapi/system.go
@@ -7,6 +7,7 @@ import (
"fmt"
"os"
goruntime "runtime"
+ "strconv"
"time"
"github.com/containers/image/v5/pkg/sysregistriesv2"
@@ -22,13 +23,18 @@ func (i *VarlinkAPI) GetVersion(call iopodman.VarlinkCall) error {
return err
}
+ int64APIVersion, err := strconv.ParseInt(versionInfo.APIVersion, 10, 64)
+ if err != nil {
+ return err
+ }
+
return call.ReplyGetVersion(
versionInfo.Version,
versionInfo.GoVersion,
versionInfo.GitCommit,
time.Unix(versionInfo.Built, 0).Format(time.RFC3339),
versionInfo.OsArch,
- versionInfo.APIVersion,
+ int64APIVersion,
)
}