Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 234704 (net-tools-failed) - sys-apps/net-tools-1.60-r13 fails to compile
Summary: sys-apps/net-tools-1.60-r13 fails to compile
Status: RESOLVED FIXED
Alias: net-tools-failed
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-14 08:37 UTC by different
Modified: 2008-08-15 04:57 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,6.91 KB, text/plain)
2008-08-14 20:33 UTC, different
Details
emerge --info (info.txt,3.06 KB, text/plain)
2008-08-14 20:35 UTC, different
Details

Note You need to log in before you can comment on or make changes to this bug.
Description different 2008-08-14 08:37:10 UTC
Hello!

I find bug in sys-apps/net-tools-1.60-r13 source code:

x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe  -I. -idirafter ./include/ -Ilib -D_GNU_SOURCE -Wall -I/var/tmp/portage/sys-apps/net-tools-1.60-r13/work/net-tools-1.60 -idirafter /var/tmp/portage/sys-apps/net-tools-1.60-r13/work/net-tools-1.60/include    -c -o ec_hw.o ec_hw.c
ec_hw.c:24: error: 'NULL' undeclared here (not in a function)
make[1]: *** [ec_hw.o] Error 1



Reproducible: Always

Steps to Reproduce:
1. Update portage tree
2. Try to emerge -bkev system

Actual Results:  
Copmile fails with error:

ec_hw.c:24: error: 'NULL' undeclared here (not in a function)


My make.conf:

CFLAGS="-march=core2 -O2 -pipe"
CXXFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
USE="mmx sse sse2 opengl hal kdeenablefinal qt3 kde X userlocales"
Comment 1 Panagiotis Christopoulos (RETIRED) gentoo-dev 2008-08-14 11:48:31 UTC
Please submit in attachments your "emerge --info" output, and the full build log. Reopen the bug, when you have submitted the above information. Thanks.
Comment 2 different 2008-08-14 20:33:12 UTC
Created attachment 162926 [details]
build.log

/var/tmp/portage/sys-apps/net-tools-1.60-r13/temp/build.log
Comment 3 different 2008-08-14 20:35:17 UTC
Created attachment 162927 [details]
emerge --info
Comment 4 different 2008-08-14 20:36:10 UTC
Info added, reopen
Comment 5 Maciej Kazulak 2008-08-14 23:16:38 UTC
This seems to work for me. Just adds stddef.h #include.

--- net-tools-1.60/lib/ec_hw.c.orig     2008-08-15 00:17:35.000000000 +0200
+++ net-tools-1.60/lib/ec_hw.c  2008-08-15 00:24:01.000000000 +0200
@@ -17,6 +17,7 @@
 #if HAVE_HWEC
 
 #include <net/if_arp.h>
+#include <stddef.h>
 #include "net-support.h"
 
 struct hwtype ec_hwtype =
Comment 6 Maciej Kazulak 2008-08-14 23:44:04 UTC
Oh and of course sys-apps/net-tools-1.60_p20071202044231-r1 already fixes that (ah how could be otherwise after i already took the time to do it myself ;)

*   0013-Pull-in-stdlib.h-for-NULL-definition-to-fix-225425.patch ...
Comment 7 different 2008-08-15 04:57:21 UTC
Thanks!