相关疑难解决方法(0)

带-std = c99的GCC抱怨不知道struct timespec

当我尝试在Linux上编译它时gcc -std=c99,编译器抱怨不知道struct timespec.但是,如果我编译它没有-std=c99一切正常.

#include <time.h>

int main(void)
{
  struct timespec asdf;
  return 0;
}
Run Code Online (Sandbox Code Playgroud)

为什么会这样,有没有办法让它继续使用-std=c99

c posix c99 timespec

40
推荐指数
2
解决办法
2万
查看次数

标签 统计

c ×1

c99 ×1

posix ×1

timespec ×1