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