Module: xenomai-3
Branch: next
Commit: 2a584d6763c64f9e566b5f53094d57dd72688857
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=2a584d6763c64f9e566b5f53094d57dd72688857

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Jul 23 19:13:29 2015 +0200

boilerplate: add offsetof() shorthand

---

 include/boilerplate/compiler.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/boilerplate/compiler.h b/include/boilerplate/compiler.h
index e27d165..876e004 100644
--- a/include/boilerplate/compiler.h
+++ b/include/boilerplate/compiler.h
@@ -54,4 +54,8 @@
 #define __aligned(__n) __attribute__((aligned (__n)))
 #endif
 
+#ifndef offsetof
+#define offsetof(__type, __member)  __builtin_offsetof(__type, __member)
+#endif
+
 #endif /* _BOILERPLATE_COMPILER_H */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to