move library packages to package/libs/
[openwrt/svn-archive/archive.git] / package / libs / libnl / patches / 110-offsetof.patch
1 --- a/include/netlink-local.h
2 +++ b/include/netlink-local.h
3 @@ -337,7 +337,9 @@ static inline int nl_cb_call(struct nl_c
4 }
5
6 #define ARRAY_SIZE(X) (sizeof(X) / sizeof((X)[0]))
7 +#ifndef offsetof
8 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
9 +#endif
10
11 #define __init __attribute__ ((constructor))
12 #define __exit __attribute__ ((destructor))