在SOCKET.C文件里加入调试语句时交叉编译出错
我在文件socket.c里加入:
asmlinkage long sys_sendto(int fd, void * buff, size_t len, unsigned flags,
struct sockaddr *addr, int addr_len)
{
printk("enter sys_sendto ok!" //加入的语句
struct socket *sock;
char address[MAX_SOCK_ADDR];
int err;
struct msghdr msg;
struct iovec iov;
sock = sockfd_lookup(fd, &err);
......
}
用arm-linux-gcc交叉编译器编译出错:
socket.c: In function `sys_sendto':
socket.c:1204: parse error before `struct'
socket.c:1210: `sock' undeclared (first use in this function)
socket.c:1210: `err' undeclared (first use in this function)
socket.c:1213: `iov' undeclared (first use in this function)
socket.c:1215: `msg' undeclared (first use in this function)
socket.c:1223: `address' undeclared (first use in this function)
socket.c:1243: warning: control reaches end of non-void function
请各位高手帮忙!谢谢!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论