From owner-svn-src-head@FreeBSD.ORG Thu Oct 9 15:26:23 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 907FBBE4; Thu, 9 Oct 2014 15:26:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D30BE13; Thu, 9 Oct 2014 15:26:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s99FQNeC042832; Thu, 9 Oct 2014 15:26:23 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99FQNDm042831; Thu, 9 Oct 2014 15:26:23 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201410091526.s99FQNDm042831@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 9 Oct 2014 15:26:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272825 - head/sys/ufs/ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2014 15:26:23 -0000 Author: bapt Date: Thu Oct 9 15:26:22 2014 New Revision: 272825 URL: https://svnweb.freebsd.org/changeset/base/272825 Log: Use offsetof() from sys/types.h instead of a custom one This fixes build with recent gcc versions Modified: head/sys/ufs/ufs/dir.h Modified: head/sys/ufs/ufs/dir.h ============================================================================== --- head/sys/ufs/ufs/dir.h Thu Oct 9 15:19:35 2014 (r272824) +++ head/sys/ufs/ufs/dir.h Thu Oct 9 15:26:22 2014 (r272825) @@ -110,7 +110,7 @@ struct direct { * */ #define DIRECTSIZ(namlen) \ - (((uintptr_t)&((struct direct *)0)->d_name + \ + ((offsetof(struct direct, d_name) + \ ((namlen)+1)*sizeof(((struct direct *)0)->d_name[0]) + 3) & ~3) #if (BYTE_ORDER == LITTLE_ENDIAN) #define DIRSIZ(oldfmt, dp) \