에 대한 맥 OS에 time.h 사용 :내가 맥 OS에서 다음 코드를 컴파일 할 크로스 컴파일러
struct timeval tv;
int retval = gettimeofday (&tv, NULL);
if (retval == 0)
TIMEVAL_TO_TIMESPEC (&tv, tp); //here I am getting the error
return retval;
을하지만 난의 크로스 컴파일러로 컴파일하고 오류
error: 'TIMEVAL_TO_TIMESPEC' was not declared in this scope
TIMEVAL_TO_TIMESPEC (&tv, tp);
무엇입니까 기계적 인조 인간. time.h 헤더를 명시 적으로 포함하려고 시도했지만 여전히 TIMEVAL_TO_TIMESPEC을 찾지 못했습니다. 어떻게하면이 코드를 올바르게 확장 할 수 있습니까?
'TIMEVAL_TO_TIMESPEC'은 유닉스 매크로처럼 보입니다. – NathanOliver