소스 검색

only define offsetof() if it isnt already defined

Mike Frysinger 18 년 전
부모
커밋
e0605c73da
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      librt/timer_create.c

+ 3 - 1
librt/timer_create.c

@@ -13,7 +13,9 @@
 
 #ifdef __NR_timer_create
 
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#ifndef offsetof
+# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
 
 #define __NR___syscall_timer_create __NR_timer_create
 static inline _syscall3(int, __syscall_timer_create, clockid_t, clock_id,