Ebtables Compile errors with gcc4

"Michael L Owen" <[email protected]>
Newsgroups gmane.linux.network.bridge.ebtables.user
Message-ID <[email protected]>
I tried to compile 2.0.6 under FC4 using gcc4, and got numerous warnings. An 
internet search found possibile solutions to several gcc4 requirements for 
stricter coding guidelines, and I got a little futher, but still have not 
gotten  make to work without erors. Has anyone else gotten any furhter?

Thanks, Mike


Initial Make produced errors like this:

ebtables.c:583: warning: pointer targets in passing argument 1 of 
?print_mac_and_mask? differ in signedness

these errors are a result of cgg4's requirement to maintain proper signage

Editing Makefile line 8 to:

CFLAGS:=-Wall -Wunused -Wno-pointer-sign

makes the errors go away, but doesn't fix the base coding errors.

Running Make after this produces new error:

gcc -Wall -Wunused -Wno-pointer-sign -DPROGVERSION=\"2.0.6\" 
-DPROGNAME=\"ebtables\" -DPROGDATE=\"November\ 2003\" 
-D_PATH_ETHERTYPES=\"/etc/ethertypes\" -c -o ebtables.o ebtables.c 
-Iinclude/
ebtables.c: In function ?check_rule_exists?:
ebtables.c:1174: error: label at end of compound statement
make: *** [ebtables.o] Error 1

resulting from the use of empty label.
Changing program from:

letscontinue:
        }
        return -1;
}

to:

letscontinue:
	return -1;
        }
        return -1;
}

makes the error go away, but I don't know if it is correct.

Third compile after this correction yields:

gcc -Wall -Wunused -Wno-pointer-sign -DPROGVERSION=\"2.0.6\" 
-DPROGNAME=\"ebtables\" -DPROGDATE=\"November\ 2003\" 
-D_PATH_ETHERTYPES=\"/etc/ethertypes\" -c -o extensions/ebt_ip.o 
extensions/ebt_ip.c -Iinclude/
extensions/ebt_ip.c: In function ?parse?:
extensions/ebt_ip.c:316: error: invalid lvalue in assignment
make: *** [extensions/ebt_ip.o] Error 1

This line appears to be casting the first digit from strtoul into an 
unsigned
char. I'm pretty much lost at this point as to how to fix it.

(unsigned char) i = strtoul(argv[optind - 1], &end, 10);




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.