INT_MAX undeclared / limits.h (was: Re: Fedora i386 rawhide rebuild in mock status 2008-02-09)

Ralf Corsepius rc040203 at freenet.de
Wed Feb 13 17:11:32 UTC 2008


On Wed, 2008-02-13 at 17:49 +0100, Till Maas wrote:
> On Wed February 13 2008, Matt Domsch wrote:
> 
> > aircrack-ng-0.9.1-2.fc8 (build/make) till
> 
> The error here is:
> 
> src/aireplay-ng.c: In function 'do_attack_test':
> src/aireplay-ng.c:4129: error: 'INT_MAX' undeclared (first use in this 
> function)
> src/aireplay-ng.c:4129: error: (Each undeclared identifier is reported only 
> once
> src/aireplay-ng.c:4129: error: for each function it appears in.)
> 
> Is this really a bug in aireplay-ng, i.e. does it have to include limits.h 
> where INT_MAX comes from, 
Yes.

> or is this a bug in some other package?
No. A *.c file must make sure it includes all headers it requires.
=> A *.c file wanting to use INT_MAX must include limits.h.

>  Why was it 
> not needed to include limits.h earlier, any ideas?
Many possibilities, but the most likely is because another header
(accidentally, bogusly) included limits.h, such that your *.c received
it indirectly?

Ralf





More information about the fedora-devel-list mailing list