110-offsetof.patch 537 B

1234567891011121314
  1. Index: libnl-1.0-pre8/include/netlink-local.h
  2. ===================================================================
  3. --- libnl-1.0-pre8.orig/include/netlink-local.h 2007-12-29 13:40:25.242226458 +0100
  4. +++ libnl-1.0-pre8/include/netlink-local.h 2007-12-29 13:40:36.882889824 +0100
  5. @@ -336,7 +336,9 @@
  6. }
  7. #define ARRAY_SIZE(X) (sizeof(X) / sizeof((X)[0]))
  8. +#ifndef offsetof
  9. #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
  10. +#endif
  11. #define __init __attribute__ ((constructor))
  12. #define __exit __attribute__ ((destructor))