[PATCH] Alternative patch for compiler error (was: [PATCH] Workaround compile error on networking/libiproute/iplink.c)

Patrick McHardy kaber at trash.net
Fri Jul 26 17:02:58 UTC 2013



Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com> schrieb:

>On Thu, 25 Jul 2013, Cristian Ionescu-Idbohrn wrote:
>> On Thu, 25 Jul 2013, Patrick McHardy wrote:
>> > On Thu, Jul 25, 2013 at 06:29:48PM +0200, Cristian Ionescu-Idbohrn
>wrote:
>> > > Ping!
>> > >
>> > > On Mon, 22 Jul 2013, Cristian Ionescu-Idbohrn wrote:
>> > > >
>> > > > IFLA_VLAN_PROTOCOL define was introduced with commit
>> > > > a7ecbed56bb620a0e8cd79372886d0fdfeb362c8.  gcc 4.8.1 complains.
>> > > >
>> > > >   CC      networking/libiproute/iplink.o
>> > > > networking/libiproute/iplink.c:26:33: error: expected
>identifier before numeric constant
>> > > >  #define IFLA_VLAN_PROTOCOL      5
>> > > >                                  ^
>> > > > make[1]: *** [networking/libiproute/iplink.o] Error 1
>> > >
>> > > Does noone else see it?  Is it only me?
>> > > I'm not C-literate but, IFLA_VLAN_PROTOCOL comes with:
>> > >
>> > > 	#include "ip_common.h"
>> > >
>> > > which:
>> > >
>> > > 	#include <linux/if_link.h>
>> > >
>> > > which:
>> > >
>> > > 	/* VLAN section */
>> > >
>> > > 	enum {
>> > > 		IFLA_VLAN_UNSPEC,
>> > > 		IFLA_VLAN_ID,
>> > > 		IFLA_VLAN_FLAGS,
>> > > 		IFLA_VLAN_EGRESS_QOS,
>> > > 		IFLA_VLAN_INGRESS_QOS,
>> > > 		IFLA_VLAN_PROTOCOL,
>> > > 		__IFLA_VLAN_MAX,
>> > > 	};
>> > >
>> > > Shouldn't:
>> > >
>> > > 	#undef  IFLA_VLAN_PROTOCOL
>> > > 	#define IFLA_VLAN_PROTOCOL      5
>> > >
>> > > come after that?
>> > >
>> > > networking/libiproute/iplink.c:25:33: error: expected identifier
>before numeric constant
>> > >  #define IFLA_VLAN_PROTOCOL      5
>> > >                                  ^
>> > > make[1]: *** [networking/libiproute/iplink.o] Error 1
>> >
>> > Sorry, I missed your email.
>>
>> No big deal.
>>
>> > I just sent a similar patch a couple of seconds ago. Could you
>please
>> > test whether it fixes the problem for you?
>>
>> Sorry, doesn't apply.  Did you format-patch against a clean master?
>
>Alright, I now realized what you did.  You replaced commit
>a7ecbed56bb620a0e8cd79372886d0fdfeb362c8 with your alternative patch.

Correct.

>So, what I've done was to revert
>a7ecbed56bb620a0e8cd79372886d0fdfeb362c8
>and `git apply' your alternative patch (FWIW, `git am' refused to
>apply).
>
>And yes, that compiled without errors.  I should have mentioned that I
>run
>with debian linux-libc-dev version 3.10.1-1 (besides gcc version
>4.8.1-8).

Thanks for testing.

Cheers,
Patrick




More information about the busybox mailing list