概述

因项目需要安装编译scamper源码,在编译时遇到如下报错:

scamper_dl.c: In function ‘dl_linux_read’:
scamper_dl.c:1134:20: error: ‘SIOCGSTAMP’ undeclared (first use in this function)
       if(ioctl(fd, SIOCGSTAMP, &dl.dl_tv) == 0)
                    ^
scamper_dl.c:1134:20: note: each undeclared identifier is reported only once for each function it appears in

解决办法

编辑scamper/scamper_dl.c文件,在文件里加上

#include<linux/sockios.h>
END

本文标题:scamper编译时提示‘SIOCGSTAMP’ undeclared

本文作者:宇宙最帅的男人

本文链接:https://lolicp.com/linux/202218444.html

版权声明:转载或者引用本文内容请注明来源及原作者,本文著作权归作者 (宇宙最帅的男人) 所有。

除非另有说明,本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议

最后修改:2022 年 08 月 18 日
如果觉得我的文章对你有用,请随意赞赏