aboutsummaryrefslogtreecommitdiffstats
path: root/package/libnl-tiny
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-05-24 16:48:18 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-05-24 16:48:18 +0000
commita4cd1939c86d59ac9df23bb6617b81153b5c389d (patch)
treeab77a0250582ef4960846506c5e0366c15ad0d3b /package/libnl-tiny
parent0e463496124420dd4c48e32e2e00a2920e879017 (diff)
downloadupstream-a4cd1939c86d59ac9df23bb6617b81153b5c389d.tar.gz
upstream-a4cd1939c86d59ac9df23bb6617b81153b5c389d.tar.bz2
upstream-a4cd1939c86d59ac9df23bb6617b81153b5c389d.zip
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')
-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 a2000fa2ff..f952bbea45 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))