Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not compile for 32 bit architecture #1

Open
nicksantamaria opened this issue Apr 26, 2018 · 1 comment
Open

Does not compile for 32 bit architecture #1

nicksantamaria opened this issue Apr 26, 2018 · 1 comment

Comments

@nicksantamaria
Copy link

I encountered an issue when compiling a project with this library with the GOARCH=386.

vendor/github.com/brotherpowers/ipsubnet/ip.go:16:27: constant 4294967295 overflows int

This is the line in question:

ipsubnet/ip.go

Line 16 in 30bc98f

subnet_mask: 0xFFFFFFFF << uint(32-networkSize),

@rmasci
Copy link

rmasci commented Mar 18, 2021

I have a version that does compile for 32 bit -- I'd do a pull request but the calls change from int to int64, so people who are on 64 bit systems would have to change from int to int64 in their code.

https://github.com/rmasci/ipsubnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants