Thread (23 messages) flat view 23 messages, 5 authors, 2016-06-22

Re: [iproute PATCH v2 2/7] Use C99 style initializers everywhere

From: Phil Sutter <phil@nwl.cc>
Date: 2016-06-21 17:03:36

On Tue, Jun 21, 2016 at 10:24:37AM -0600, David Ahern wrote:
On 6/21/16 10:18 AM, Phil Sutter wrote:
quoted
This big patch was compiled by vimgrepping for memset calls and changing
to C99 initializer if applicable. One notable exception is the
initialization of union bpf_attr in tc/tc_bpf.c: changing it would break
for older gcc versions (at least <=3.4.6).

Calls to memset for struct rtattr pointer fields for parse_rtattr*()
were just dropped since they are not needed.

The changes here allowed the compiler to discover some unused variables,
so get rid of them, too.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
Changes since v1:
- Dropped former changes to tc/tc_bpf.c as they are incompatible to older
  gcc versions (at least <=3.4.6).

What OS versions have you compiled iproute2 against?
Tested on Gentoo with old compiler installed, so apart from gcc the
system is up to date.
I downloaded CentOS 5 and 6. iproute2 fails to compile on CentOS 5.11; 
ip command builds on 6.8 but with a flurry of redefinition errors 
(BUILD_BUG_ON), but fails at tc.
What's the exact error message please? Maybe some incompatibility in
kernel headers? Although that shouldn't be ...

Cheers, Phil
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help