当前位置: 代码迷 >> 综合 >> 包含 videodev2.h 时 timestamp 报错的解决方法
  详细解决方案

包含 videodev2.h 时 timestamp 报错的解决方法

热度:10   发布时间:2024-01-06 15:45:19.0

 

在 #include <linux/videodev2.h>  后编译会报一个错:

 field ‘timestamp’ has incomplete type
  struct timespec   timestamp;   2225    
 

解决方法是在

#include <linux/videodev2.h> 

之前加两行:

#include <bits/types/struct_timespec.h>
#include <bits/types/struct_timeval.h>#include <linux/videodev2.h>

 

  相关解决方案