From 54670c01d9860b27bc096e04e763170687bfd7fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Couton?= <57408786+CedricCouton@users.noreply.github.com> Date: Sun, 2 Oct 2022 14:04:43 +0200 Subject: [PATCH] Fix build on armv7l (#174) If we try to build on armv7l we have this error : ios/dtx_codec/connection.go:174:31: cannot use 4294967295 (untyped int constant) as int value in argument to dtxConn.activeChannels.Store (overflows) --- ios/dtx_codec/connection.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios/dtx_codec/connection.go b/ios/dtx_codec/connection.go index 48177812..f185a08b 100644 --- a/ios/dtx_codec/connection.go +++ b/ios/dtx_codec/connection.go @@ -5,6 +5,7 @@ import ( "strings" "sync" "time" + "math" ios "github.com/danielpaulus/go-ios/ios" "github.com/danielpaulus/go-ios/ios/nskeyedarchiver" @@ -171,7 +172,7 @@ func (dtxConn *Connection) ForChannelRequest(messageDispatcher Dispatcher) *Chan // This channel seems to always be there without explicitly requesting it and sometimes it is used. func (dtxConn *Connection) AddDefaultChannelReceiver(messageDispatcher Dispatcher) *Channel { channel := &Channel{channelCode: -1, channelName: "c -1/ 4294967295 receiver channel ", messageIdentifier: 1, connection: dtxConn, messageDispatcher: messageDispatcher, responseWaiters: map[int]chan Message{}, defragmenters: map[int]*FragmentDecoder{}, timeout: 5 * time.Second} - dtxConn.activeChannels.Store(4294967295, channel) + dtxConn.activeChannels.Store(uint32(math.MaxUint32), channel) return channel }