根据此文档
http://www.cplusplus.com/reference/clibrary/ctime/time/
解决方法
您可能正在没有实时时钟的嵌入式设备上运行.
glibc源代码声称系统调用在Linux上不会失败:@H_301_3@
time_t res = INTERNAL_SYSCALL (time,err,1,NULL); /* There cannot be any error. */
SYSCALL_DEFINE1(time,time_t __user *,tloc) { time_t i = get_seconds(); if (tloc) { if (put_user(i,tloc)) return -EFAULT; } force_successful_syscall_return(); return i; }