ifru专题

ubuntu报错:error: field ‘ifru_addr’ has incomplete type

error: field ‘ifru_addr’ has incomplete type 参考资料  https://www.phpfans.net/ask/linux1/2779302251.html   解决方法: 在代码中插入以下两行即可 #include <sys/types.h> #include <sys/socket.h>