summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2010-05-29 04:35:29 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2010-05-29 04:35:29 +0000
commitf313543ecea62890c909b1318b7362aebe044e62 (patch)
tree3a5216ab20e8390dc2547fd600d9002d1831d592 /cpukit/libnetworking
parent2010-05-29 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-f313543ecea62890c909b1318b7362aebe044e62.tar.bz2
2010-05-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/net/if.c: Use uintptr_t and void* in _offsetof().
Diffstat (limited to 'cpukit/libnetworking')
-rw-r--r--cpukit/libnetworking/net/if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/libnetworking/net/if.c b/cpukit/libnetworking/net/if.c
index 93773dbd80..36d48fcc34 100644
--- a/cpukit/libnetworking/net/if.c
+++ b/cpukit/libnetworking/net/if.c
@@ -134,7 +134,7 @@ if_attach(struct ifnet *ifp)
* create a Link Level name for this device
*/
namelen = sprintf(workbuf, "%s%d", ifp->if_name, ifp->if_unit);
-#define _offsetof(t, m) ((int)((caddr_t)&((t *)0)->m))
+#define _offsetof(t, m) ((uintptr_t)((void*)&((t *)0)->m))
masklen = _offsetof(struct sockaddr_dl, sdl_data[0]) + namelen;
socksize = masklen + ifp->if_addrlen;
#define ROUNDUP(a) (1 + (((a) - 1) | (sizeof(long) - 1)))