-
Notifications
You must be signed in to change notification settings - Fork 9
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
Could not compile: constant overflows int #4
Comments
What platform do you use? Is it some 32bit ARM? Show me your |
I believe that must be the case. I do not completely understand the build system I am working with, so it might take me a while to confirm that. Do you suspect this issue to occur in 32-bit Go? By the way, when I try this on 64-bit machine, it does work. |
I believe it fails due to the difference between 32 and 64bit platforms. The fix would be: diff --git a/dm.go b/dm.go
index 3262431..ec79b03 100644
--- a/dm.go
+++ b/dm.go
@@ -82,7 +82,7 @@ type targetSpec struct {
// This flag is later processed by rules at /usr/lib/udev/rules.d/10-dm.rules
// Per devicecrypt sourcecode only RESUME, REMOVE, RENAME operations need to have DM_UDEV_PRIMARY_SOURCE_FLAG
// flag set.
-func dmIoctl(controlFile *os.File, cmd int, name string, uuid string, udevEvent bool, specs []targetSpec) error {
+func dmIoctl(controlFile *os.File, cmd uint64, name string, uuid string, udevEvent bool, specs []targetSpec) error {
const (
// allocate buffer large enough for dmioctl + specs
alignment = 8 I will apply it once I carefully test it. |
Got this error while compiling:
I believe I am using
go version go1.14.7 linux/amd64
, but I might be wrong.Do you happen to know how can I get past this?
The text was updated successfully, but these errors were encountered: