From: Mathias Gibbens <gibmat@debian.org>
Description: Fix build failure on 32bit systems
Forwarded: https://github.com/lestrrat-go/backoff/pull/36
diff --git a/controller.go b/controller.go
index 1d6c721..16ab8f9 100644
--- a/controller.go
+++ b/controller.go
@@ -10,22 +10,22 @@ type controller struct {
 	ctx        context.Context
 	cancel     func()
 	ig         IntervalGenerator
-	maxRetries int
+	maxRetries int64
 	mu         *sync.RWMutex
 	next       chan struct{} // user-facing channel
 	resetTimer chan time.Duration
-	retries    int
+	retries    int64
 	timer      *time.Timer
 }
 
 func newController(ctx context.Context, ig IntervalGenerator, options ...ControllerOption) *controller {
 	cctx, cancel := context.WithCancel(ctx) // DO NOT fire this cancel here
 
-	maxRetries := 10
+	maxRetries := int64(10)
 	for _, option := range options {
 		switch option.Ident() {
 		case identMaxRetries{}:
-			maxRetries = option.Value().(int)
+			maxRetries = option.Value().(int64)
 		}
 	}
 
diff --git a/options.go b/options.go
index f288f99..beba9b9 100644
--- a/options.go
+++ b/options.go
@@ -76,7 +76,7 @@ func (*commonOption) exponentialOption() {}
 // of each policy.
 //
 // This option can be passed to all policy constructors except for NullPolicy
-func WithMaxRetries(v int) ControllerOption {
+func WithMaxRetries(v int64) ControllerOption {
 	return &controllerOption{option.New(identMaxRetries{}, v)}
 }
 
