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

fix for mips compile #29

Merged
merged 4 commits into from Sep 27, 2017
Merged

fix for mips compile #29

merged 4 commits into from Sep 27, 2017

Conversation

yinheli
Copy link
Contributor

@yinheli yinheli commented Aug 28, 2017

issue detail : golang/go#21596
const is untyped int

issue detail : golang/go#21596
const is untyped int
Copy link
Owner

@songgao songgao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay! I wanted to check a few more things but never got to it earlier. Just one small nit.

Thanks for fixing it for mips! I'm curious what interesting project you are using it for. Something running on routers?

@@ -22,7 +22,7 @@ type ifReq struct {
pad [0x28 - 0x10 - 2]byte
}

func ioctl(fd uintptr, request int, argp uintptr) error {
func ioctl(fd uintptr, request uint, argp uintptr) error {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like uintptr is a better choice, given that Syscall expects that exact argument. Would you mind changing to that?

I think I used int here originally since this parameter being a pointer felt weird to me, and I just assumed it was always typed as int.

@yinheli
Copy link
Contributor Author

yinheli commented Sep 19, 2017

@songgao yes,I build a gateway which run in openwrt/lede router. I have already change,thanks for your suggestion.

@songgao
Copy link
Owner

songgao commented Sep 19, 2017

Thanks for fixing; I forgot to ask last time; could you please add yourself intoCONTRIBUTORS?

@yinheli
Copy link
Contributor Author

yinheli commented Sep 22, 2017

sorry for delay.

@songgao songgao merged commit dc106b4 into songgao:master Sep 27, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants