Module Name: src Committed By: matt Date: Fri Feb 4 02:01:13 UTC 2011
Modified Files: src/lib/libc/net: getifaddrs.c Log Message: Use RT_ROUNDUP instead of a private copy since that's what the kernel uses. (t_getaddrinfo passes for both i386 (compat_netbsd32) and amd64 with this change). To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libc/net/getifaddrs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/net/getifaddrs.c diff -u src/lib/libc/net/getifaddrs.c:1.13 src/lib/libc/net/getifaddrs.c:1.14 --- src/lib/libc/net/getifaddrs.c:1.13 Fri Nov 5 16:23:56 2010 +++ src/lib/libc/net/getifaddrs.c Fri Feb 4 02:01:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: getifaddrs.c,v 1.13 2010/11/05 16:23:56 pooka Exp $ */ +/* $NetBSD: getifaddrs.c,v 1.14 2011/02/04 02:01:12 matt Exp $ */ /* * Copyright (c) 1995, 1999 @@ -27,7 +27,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: getifaddrs.c,v 1.13 2010/11/05 16:23:56 pooka Exp $"); +__RCSID("$NetBSD: getifaddrs.c,v 1.14 2011/02/04 02:01:12 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #ifndef RUMP_ACTION @@ -58,8 +58,7 @@ #define sysctl(a,b,c,d,e,f) rump_sys___sysctl(a,b,c,d,e,f) #endif -#define SALIGN (sizeof(long) - 1) -#define SA_RLEN(sa) ((sa)->sa_len ? (((sa)->sa_len + SALIGN) & ~SALIGN) : (SALIGN + 1)) +#define SA_RLEN(sa) RT_ROUNDUP((sa)->sa_len) int getifaddrs(struct ifaddrs **pif)