英文:
golang error: reference to undefined identifier ‘syscall.TUNSETIFF’
问题
所以,我一直在尝试使用gccgo构建flannel(https://github.com/coreos/flannel)。在构建过程中,我遇到了以下错误:
$ ./build
Building flanneld...
# github.com/coreos/flannel/pkg/ip
gopath/src/github.com/coreos/flannel/pkg/ip/tun.go:57:37: error: reference to undefined identifier ‘syscall.TUNSETIFF’
err = ioctl(int(tun.Fd()), syscall.TUNSETIFF, uintptr(unsafe.Pointer(&ifr)))
^
我正在使用gccgo-5和gcc-5。有人能帮我弄清楚这个问题是什么吗?谢谢。
英文:
So, I have been trying to build flannel (https://github.com/coreos/flannel) with gccgo. Here is the error I am getting while building:
$ ./build
Building flanneld...
# github.com/coreos/flannel/pkg/ip
gopath/src/github.com/coreos/flannel/pkg/ip/tun.go:57:37: error: reference to undefined identifier ‘syscall.TUNSETIFF’
err = ioctl(int(tun.Fd()), syscall.TUNSETIFF, uintptr(unsafe.Pointer(&ifr)))
^
I am using gccgo-5 and gcc-5. Can anyone please help me figure out what exactly is the issue here? TIA
答案1
得分: 0
所以,我找到了答案。问题是gccgo没有为我的架构定义TUNSETIFF。我相应地定义了该值,然后就能够使其正常工作了。谢谢@JimB。
英文:
So, I found the answer. The problem was that gccgo didn't define TUNSETIFF for my arch. I defined the value accordingly and I was able to make it work. Thanks @JimB
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论