소스 검색

time.h: add BSD aliases for otherwise internal struct tm members

rofl0r 12 년 전
부모
커밋
87781ac64c
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      include/time.h

+ 4 - 0
include/time.h

@@ -45,6 +45,10 @@ struct tm
 	long __tm_gmtoff;
 	const char *__tm_zone;
 };
+#if defined(_BSD_SOURCE)
+#define tm_gmtoff __tm_gmtoff
+#define tm_zone __tm_zone
+#endif
 
 clock_t clock (void);
 time_t time (time_t *);