summaryrefslogtreecommitdiffstats
path: root/package/libnl-tiny/src
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-05-24 16:48:18 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-05-24 16:48:18 +0000
commit1b87042f81aeea402ae8e05183fa9179634d3655 (patch)
treeab77a0250582ef4960846506c5e0366c15ad0d3b /package/libnl-tiny/src
parent59ef9d52e496a9ec5670894e486a9e00cdc00ead (diff)
libnl-tiny: fix potential redefinition of offsetof
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16030 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/libnl-tiny/src')
-rw-r--r--package/libnl-tiny/src/include/netlink-local.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/libnl-tiny/src/include/netlink-local.h b/package/libnl-tiny/src/include/netlink-local.h
index a2000fa2f..f952bbea4 100644
--- a/package/libnl-tiny/src/include/netlink-local.h
+++ b/package/libnl-tiny/src/include/netlink-local.h
@@ -109,7 +109,9 @@ static inline int nl_cb_call(struct nl_cb *cb, int type, struct nl_msg *msg)
}
#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))