if_cxgbev build error on -stable
Konstantin Belousov
kostikbel at gmail.com
Sun Dec 4 13:53:34 UTC 2016
On Sun, Dec 04, 2016 at 04:23:00PM +0300, Andrey Chernov wrote:
> It seems counter.h is included before systm.h where critical_* are declared.
It is more weird, since sys/counter.h was added in the stable/10
merge, but the header is not used in the HEAD sources. It is indeed
needed for stable/10 driver. critical_enter() pre-requisite for counter.h
only exists on i386, which probably explains why John' build test did not
catched it.
I am preparing another MFC, so I committed the fix in r309529.
>
> On 04.12.2016 16:12, Andrey Chernov wrote:
> > On recent i386 -stable I got:
> >
> > ...
> > /usr/src/sys/modules/cxgbe/if_cxgbev/../../../dev/cxgbe/t4_vf.c -o t4_vf.o
> > In file included from
> > /usr/src/sys/modules/cxgbe/if_cxgbev/../../../dev/cxgbe/t4_vf.c:37:
> > In file included from @/sys/counter.h:35:
> > ./machine/counter.h:170:3: error: implicit declaration of function
> > 'critical_enter' is invalid in C99
> > [-Werror,-Wimplicit-function-declaration]
> > critical_enter();
> > ^
> > ./machine/counter.h:172:3: error: implicit declaration of function
> > 'critical_exit' is invalid in C99
> > [-Werror,-Wimplicit-function-declaration]
> > critical_exit();
> > ^
> > ./machine/counter.h:172:3: note: did you mean 'critical_enter'?
> > ./machine/counter.h:170:3: note: 'critical_enter' declared here
> > critical_enter();
> > ^
> > In file included from
> > /usr/src/sys/modules/cxgbe/if_cxgbev/../../../dev/cxgbe/t4_vf.c:47:
> > In file included from
> > /usr/src/sys/modules/cxgbe/if_cxgbev/../../../dev/cxgbe/common/common.h:33:
> > In file included from
> > /usr/src/sys/modules/cxgbe/if_cxgbev/../../../dev/cxgbe/common/t4_hw.h:33:
> > In file included from
> > /usr/src/sys/modules/cxgbe/if_cxgbev/../../../dev/cxgbe/osdep.h:39:
> > @/sys/systm.h:196:6: error: conflicting types for 'critical_enter'
> > void critical_enter(void);
> > ^
> > ./machine/counter.h:170:3: note: previous implicit declaration is here
> > critical_enter();
> > ^
> > In file included from
> > /usr/src/sys/modules/cxgbe/if_cxgbev/../../../dev/cxgbe/t4_vf.c:47:
> > In file included from
> > /usr/src/sys/modules/cxgbe/if_cxgbev/../../../dev/cxgbe/common/common.h:33:
> > In file included from
> > /usr/src/sys/modules/cxgbe/if_cxgbev/../../../dev/cxgbe/common/t4_hw.h:33:
> > In file included from
> > /usr/src/sys/modules/cxgbe/if_cxgbev/../../../dev/cxgbe/osdep.h:39:
> > @/sys/systm.h:197:6: error: conflicting types for 'critical_exit'
> > void critical_exit(void);
> > ^
> > ./machine/counter.h:172:3: note: previous implicit declaration is here
> > critical_exit();
> > ^
> > 4 errors generated.
> > *** Error code 1
> >
> > Stop.
> >
>
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
More information about the freebsd-stable
mailing list