summaryrefslogtreecommitdiff
path: root/librt/timer_create.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-08-23 23:14:49 +0000
committerMike Frysinger <vapier@gentoo.org>2006-08-23 23:14:49 +0000
commite0605c73da33c6f06b13c4bdf5cb42db97cd4b30 (patch)
treec890dfbe89323d5f02efabf65ff75c52b18e7a56 /librt/timer_create.c
parent2a20207a2e98736fec65c61afea3d6a523eee6e9 (diff)
only define offsetof() if it isnt already defined
Diffstat (limited to 'librt/timer_create.c')
-rw-r--r--librt/timer_create.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/librt/timer_create.c b/librt/timer_create.c
index a49572792..cbd7bb615 100644
--- a/librt/timer_create.c
+++ b/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,