gpt4 book ai didi

戈兰错误: reference to undefined identifier ‘syscall.TUNSETIFF’

转载 作者:数据小太阳 更新时间:2023-10-29 03:28:26 25 4
gpt4 key购买 nike

因此,我一直在尝试使用 gccgo 构建法兰绒 (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。谁能帮我弄清楚这里到底是什么问题?时间差

最佳答案

所以,我找到了答案。问题是 gccgo 没有为我的 arch 定义 TUNSETIFF。我相应地定义了这个值,并且我能够让它发挥作用。谢谢@JimB

关于戈兰错误: reference to undefined identifier ‘syscall.TUNSETIFF’ ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31181747/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com