OSDN Git Service

only define offsetof() if it isnt already defined
authorMike Frysinger <vapier@gentoo.org>
Wed, 23 Aug 2006 23:14:49 +0000 (23:14 -0000)
committerMike Frysinger <vapier@gentoo.org>
Wed, 23 Aug 2006 23:14:49 +0000 (23:14 -0000)
librt/timer_create.c

index a495727..cbd7bb6 100644 (file)
@@ -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,