From owner-freebsd-current@FreeBSD.ORG Mon Jul 15 14:56:48 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CBADF835; Mon, 15 Jul 2013 14:56:48 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) by mx1.freebsd.org (Postfix) with ESMTP id 4242DF3; Mon, 15 Jul 2013 14:56:48 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id ey16so2971805wid.10 for ; Mon, 15 Jul 2013 07:56:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ecgDsXW7/38c4+fMtfdThkcC8bpv/QY2RHmjTsL23Lk=; b=b6Zs4ijNT5VJPNWG2rlC4lUVz00BjdMzLc272OfbkCp4cWbL8UeILGeFR5k70EctUV nuYbTZopgom65laAFxxWAi3I7vnZNqxKzvrr01HTZNmuO64DOUv8urwweYLc0d7eEO3U KzialqR3plMD/XZv28PiguXE+ih0zVuVOiwcnBYAR+VH2OQikGZf6tNpSZv0Vi7ROtUx mZLPJIVxe3i5i8ScHAwaEvga3rqa0opxdnvEv1GiAuh2GKeDmbX7oyEczH12GhLejeWa BW5nnPKCUOnurFvqWF76jDKBoOWU6vQa1CsxjdJcWVj7iE9FEl8cTdY+EnFyV0hblT21 bUlw== MIME-Version: 1.0 X-Received: by 10.180.13.5 with SMTP id d5mr9095017wic.56.1373900206725; Mon, 15 Jul 2013 07:56:46 -0700 (PDT) Received: by 10.216.82.70 with HTTP; Mon, 15 Jul 2013 07:56:46 -0700 (PDT) In-Reply-To: References: Date: Mon, 15 Jul 2013 18:56:46 +0400 Message-ID: Subject: Re: r253351 implicit definition of 'critical_exit'. From: Sergey Kandaurov To: Ian FREISLICH Content-Type: text/plain; charset=ISO-8859-1 Cc: ae@freebsd.org, current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jul 2013 14:56:48 -0000 On 15 July 2013 18:01, Ian FREISLICH wrote: > Hi > > Recent change: > ----- > # svn log ./sys/sys/sf_buf.h |less > ------------------------------------------------------------------------ > r253351 | ae | 2013-07-15 08:16:57 +0200 (Mon, 15 Jul 2013) | 6 lines > > Introduce new structure sfstat for collecting sendfile's statistics > and remove corresponding fields from struct mbstat. Use PCPU counters > and SFSTAT_INC() macro for update these statistics. > ----- > > Includes sys/counter.h in sys/sf_buf.h. sys/counter.h uses macros > defined in sys/systm.h resulting in implicit definitions of > critical_exit and others and then errors in conflicting types for > critical_exit later when sys/system.h is includd _after_ sys/sf_buf.h > in sys/i386/i386/uio_machdep.c. > > I haven't checked amd64 yet, but this patch fixes the build: > > Index: /usr/src/sys/i386/i386/uio_machdep.c > =================================================================== > --- /usr/src/sys/i386/i386/uio_machdep.c (revision 253361) > +++ /usr/src/sys/i386/i386/uio_machdep.c (working copy) > @@ -44,8 +44,8 @@ > #include > #include > #include > +#include > #include > -#include > #include > > #include > > However, sys/system.h coul equally be included in sys/sf_buf.h > before sys/counter.h. I don't know which is the correct fix. AFAIK, this is because systm.h isn't properly sorted here (also in amd64 and probably others). It should go right after sys/param.h. -- wbr, pluknet