Date: Mon, 15 Jul 2013 18:56:46 +0400 From: Sergey Kandaurov <pluknet@gmail.com> To: Ian FREISLICH <ianf@clue.co.za> Cc: ae@freebsd.org, current@freebsd.org Subject: Re: r253351 implicit definition of 'critical_exit'. Message-ID: <CAE-mSOJvXc7GLj7s6EGndZTq9VyMAZa1YoHJKs_pVoY5pOrgLg@mail.gmail.com> In-Reply-To: <E1UyjL7-00012X-W2@clue.co.za> References: <E1UyjL7-00012X-W2@clue.co.za>
next in thread | previous in thread | raw e-mail | index | archive | help
On 15 July 2013 18:01, Ian FREISLICH <ianf@clue.co.za> 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 <sys/mutex.h> > #include <sys/proc.h> > #include <sys/sched.h> > +#include <sys/systm.h> > #include <sys/sf_buf.h> > -#include <sys/systm.h> > #include <sys/uio.h> > > #include <vm/vm.h> > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAE-mSOJvXc7GLj7s6EGndZTq9VyMAZa1YoHJKs_pVoY5pOrgLg>