[patch] amd64/gcc-4.0: invalid lvalue in assignment
Jochen Friedrich <[email protected]>
| Newsgroups | gmane.linux.network.bridge.ebtables.devel |
|---|---|
| Message-ID | <Pine.LNX.4.58.0501072350290.5230@localhost> |
Hi, this patch has been submitted by the amd64 porters team. See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=288975 Thanks, Jochen -- Bug, n.: An aspect of a computer program which exists because the programmer was thinking about girls or stock options when he wrote the program. ---------- Forwarded message ---------- Date: Thu, 06 Jan 2005 16:56:48 +0100 From: Andreas Jochens <[email protected]> To: Debian Bug Tracking System <[email protected]> Subject: Bug#288975: ebtables: FTBFS (amd64/gcc-4.0): invalid lvalue in assignment Resent-Date: Thu, 06 Jan 2005 16:03:04 UTC Resent-From: Andreas Jochens <[email protected]> Resent-To: [email protected] Resent-cc: Jochen Friedrich <[email protected]> Package: ebtables Severity: normal Tags: patch When building 'ebtables' on amd64 with gcc-4.0, I get the following error: gcc -g -Wall -O2 -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[1]: *** [extensions/ebt_ip.o] Error 1 make[1]: Leaving directory `/ebtables-2.0.6' make: *** [debian/stamp-makefile-build] Error 2 With the attached patch 'ebtables' can be compiled on amd64 using gcc-4.0. Regards Andreas Jochens diff -urN ../tmp-orig/ebtables-2.0.6/extensions/ebt_ip.c ./extensions/ebt_ip.c --- ../tmp-orig/ebtables-2.0.6/extensions/ebt_ip.c 2003-11-02 19:22:56.000000000 +0100 +++ ./extensions/ebt_ip.c 2005-01-06 16:52:53.812299096 +0100 @@ -313,7 +313,7 @@ ipinfo->invflags |= EBT_IP_PROTO; if (optind > argc) print_error("Missing IP protocol argument"); - (unsigned char) i = strtoul(argv[optind - 1], &end, 10); + i = strtoul(argv[optind - 1], &end, 10); if (*end != '\0') { struct protoent *pe; diff -urN ../tmp-orig/ebtables-2.0.6/extensions/ebt_limit.c ./extensions/ebt_limit.c --- ../tmp-orig/ebtables-2.0.6/extensions/ebt_limit.c 2003-11-02 19:22:56.000000000 +0100 +++ ./extensions/ebt_limit.c 2005-01-06 16:53:58.370484760 +0100 @@ -203,15 +203,15 @@ static struct ebt_u_match limit_match = { - .name EBT_LIMIT_MATCH, - .size sizeof(struct ebt_limit_info), - .help print_help, - .init init, - .parse parse, - .final_check final_check, - .print print, - .compare compare, - .extra_ops opts, + .name = EBT_LIMIT_MATCH, + .size = sizeof(struct ebt_limit_info), + .help = print_help, + .init = init, + .parse = parse, + .final_check = final_check, + .print = print, + .compare = compare, + .extra_ops = opts, }; static void _init(void) __attribute((constructor)); diff -urN ../tmp-orig/ebtables-2.0.6/extensions/ebt_vlan.c ./extensions/ebt_vlan.c --- ../tmp-orig/ebtables-2.0.6/extensions/ebt_vlan.c 2003-11-02 19:22:56.000000000 +0100 +++ ./extensions/ebt_vlan.c 2005-01-06 16:53:16.621831520 +0100 @@ -141,7 +141,7 @@ check_option(flags, OPT_VLAN_ID); CHECK_INV_FLAG(EBT_VLAN_ID); CHECK_IF_MISSING_VALUE; - (unsigned short) local.id = + local.id = strtoul(argv[optind - 1], &end, 10); CHECK_RANGE(local.id > 4094 || *end != '\0'); vlaninfo->id = local.id; @@ -152,7 +152,7 @@ check_option(flags, OPT_VLAN_PRIO); CHECK_INV_FLAG(EBT_VLAN_PRIO); CHECK_IF_MISSING_VALUE; - (unsigned char) local.prio = + local.prio = strtoul(argv[optind - 1], &end, 10); CHECK_RANGE(local.prio >= 8 || *end != '\0'); vlaninfo->prio = local.prio; @@ -163,7 +163,7 @@ check_option(flags, OPT_VLAN_ENCAP); CHECK_INV_FLAG(EBT_VLAN_ENCAP); CHECK_IF_MISSING_VALUE; - (unsigned short) local.encap = + local.encap = strtoul(argv[optind - 1], &end, 16); if (*end != '\0') { ethent = getethertypebyname(argv[optind - 1]); ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt