Browse Source

only define offsetof() if it isnt already defined

Mike Frysinger 17 years ago
parent
commit
e0605c73da
1 changed files with 3 additions and 1 deletions
  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,