소스 검색

Include time.h when struct timespec is used

In both the POSIX ( http://pubs.opengroup.org/onlinepubs/009695299/basedefs/time.h.html ) and C11 ( https://en.cppreference.com/w/c/chrono/timespec ) standards, the struct timespec structure is defined in the time.h header. 

Depending on the specific VxWorks version, the time.h header could be already transitively included by one of the other headers, 
but explicitly adding the time.h include makes sure the UA_sleep_ms macro will work correctly on all possible versions.
Silvio Traversaro 5 년 전
부모
커밋
ce4a4cbe02
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      arch/vxworks/ua_architecture.h

+ 1 - 0
arch/vxworks/ua_architecture.h

@@ -13,6 +13,7 @@
 #include "ua_architecture_base.h"
 
 #include <errno.h>
+#include <time.h>
 
 #include <arpa/inet.h>
 #include <netinet/in.h>