Re: gcc issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---- Jakub Jelinek <jakub@xxxxxxxxxx> wrote: 
> On Wed, Feb 04, 2009 at 10:35:09AM -0500, Steve wrote:
> > On my fully-up-to-date F9 system, this file, junk.c:
> > 
> > #include <netinet/in.h>
> > 
> > struct my_struct {
> > 	struct	in6_addr	ipi6_addr;
> > 	unsigned int	ipi6_ifindex;
> > };
> > 
> > int main ( int argc, char **argv )
> > {
> > 	int			x,y;
> > 	struct	in6_pktinfo	junk;
> > 	struct	my_struct	junk2;
> > 
> > 	x = sizeof (junk);
> > 	y = sizeof (junk2);
> > }
> > 
> > when compiled gives this error:
> > $ gcc -c junk.c
> > junk.c: In function ‘main’:
> > junk.c:12: error: storage size of ‘junk’ isn’t known
> 
> Compile with
> gcc -D_GNU_SOURCE -c junk.c
> as struct in6_pktinfo is a GNU extension.
> info libc 'Feature Test Macros'
> for more info.

Thanks, that works. 
I had tried putting #define __USE_GNU in the code but that didn't make any difference.
I downloaded the source rpm for dhcp-4.0.0 and the compile failed with this error. Packaging error or configure error?

Thanks,
Steve

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux