From owner-svn-src-user@FreeBSD.ORG Thu Jan 1 03:08:34 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE22C1065672; Thu, 1 Jan 2009 03:08:34 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC93E8FC16; Thu, 1 Jan 2009 03:08:34 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0138Yc0042738; Thu, 1 Jan 2009 03:08:34 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0138YGk042736; Thu, 1 Jan 2009 03:08:34 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200901010308.n0138YGk042736@svn.freebsd.org> From: Kip Macy Date: Thu, 1 Jan 2009 03:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186672 - user/kmacy/HEAD_fast_net/sys/contrib/ipfilter/netinet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 03:08:35 -0000 Author: kmacy Date: Thu Jan 1 03:08:34 2009 New Revision: 186672 URL: http://svn.freebsd.org/changeset/base/186672 Log: use gcc __offsetof Modified: user/kmacy/HEAD_fast_net/sys/contrib/ipfilter/netinet/ip_compat.h user/kmacy/HEAD_fast_net/sys/contrib/ipfilter/netinet/ip_sync.c Modified: user/kmacy/HEAD_fast_net/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- user/kmacy/HEAD_fast_net/sys/contrib/ipfilter/netinet/ip_compat.h Thu Jan 1 03:08:07 2009 (r186671) +++ user/kmacy/HEAD_fast_net/sys/contrib/ipfilter/netinet/ip_compat.h Thu Jan 1 03:08:34 2009 (r186672) @@ -1825,7 +1825,7 @@ typedef struct tcpiphdr tcpiphdr_t; #endif #ifndef offsetof -# define offsetof(t,m) (int)((&((t *)0L)->m)) +# define offsetof(t,m) (size_t)((&((t *)0L)->m)) #endif /* Modified: user/kmacy/HEAD_fast_net/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- user/kmacy/HEAD_fast_net/sys/contrib/ipfilter/netinet/ip_sync.c Thu Jan 1 03:08:07 2009 (r186671) +++ user/kmacy/HEAD_fast_net/sys/contrib/ipfilter/netinet/ip_sync.c Thu Jan 1 03:08:34 2009 (r186672) @@ -729,9 +729,9 @@ void *data; } nat = (nat_t *)data; - bzero((char *)n, offsetof(nat_t, nat_age)); + bzero((char *)n, __offsetof(nat_t, nat_age)); bcopy((char *)&nat->nat_age, (char *)&n->nat_age, - sizeof(*n) - offsetof(nat_t, nat_age)); + sizeof(*n) - __offsetof(nat_t, nat_age)); ipfsync_natorder(0, n); n->nat_sync = sl;