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

gcc issue



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

$ gcc --version
gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

On a Suse 11.1 system running gcc v4.3.2, the same file compiles without errors.

I'm trying to compile dhcp-4.0.0 which uses struct in6_pktinfo. Can anyone suggest a workaround? (and please don't say switch to Suse ;-D)

Thanks,
Steve


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