Package: iproute2 Version: 3.9.0-3 Severity: serious Tags: patch Justification: fails to build from source (but built successfully in the past)
Hi! As iproute2 builds with -Werror, new warnings that came up with gcc-4.8 (the new default on x86 and arm architectures) make it FTBFS. lnstat.c: In function 'build_hdr_string': lnstat.c:169:30: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess] memset(th.hdr[i], 0, sizeof(th.hdr[i])); This one actually looks quite serious: it zeroes only the first 4/8 bytes of the structure. In any case, thanks to -Werror it's fatal. Patch attached, with a rider that also fixes another FTBFS, this time on x32 only. -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (1500, 'unstable'), (500, 'experimental') Architecture: x32 (x86_64) Kernel: Linux 3.9.4-x32 (SMP w/6 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages iproute2 depends on: ii libc6 2.17-6 ii libdb5.1 5.1.29-6 Versions of packages iproute2 recommends: ii libatm1 1:2.5.1-1.5 ii libxtables10 1.4.18-1 Versions of packages iproute2 suggests: pn iproute2-doc <none> -- no debconf information
diff -Nurd iproute2-3.9.0.orig/ip/iproute.c iproute2-3.9.0/ip/iproute.c --- iproute2-3.9.0.orig/ip/iproute.c 2013-04-30 14:47:54.000000000 +0000 +++ iproute2-3.9.0/ip/iproute.c 2013-06-24 16:33:29.731514426 +0000 @@ -1330,7 +1330,7 @@ if (time(0) - start > 30) { printf("\n*** Flush not completed after %ld seconds, %d entries remain ***\n", - time(0) - start, filter.flushed); + (long)(time(0) - start), filter.flushed); exit(1); } diff -Nurd iproute2-3.9.0.orig/misc/lnstat.c iproute2-3.9.0/misc/lnstat.c --- iproute2-3.9.0.orig/misc/lnstat.c 2013-04-30 14:47:54.000000000 +0000 +++ iproute2-3.9.0/misc/lnstat.c 2013-06-24 17:11:01.942620103 +0000 @@ -166,7 +166,7 @@ for (i = 0; i < HDR_LINES; i++) { th.hdr[i] = malloc(HDR_LINE_LENGTH); - memset(th.hdr[i], 0, sizeof(th.hdr[i])); + memset(th.hdr[i], 0, sizeof(*th.hdr[i])); } for (i = 0; i < fps->num; i++) {