Bug 25902

Summary: Missing -I for Documentation/networking/ifenslave.c
Product: Networking Reporter: Alexey Salmin (alexey.salmin)
Component: OtherAssignee: Arnaldo Carvalho de Melo (acme)
Status: CLOSED CODE_FIX    
Severity: low CC: alexey.salmin, florian, randy.dunlap
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.34.7 Subsystem:
Regression: No Bisected commit-id:

Description Alexey Salmin 2010-12-30 07:52:45 UTC
Trying to build a 2.6.34.7 kernel with allyesconfig (I'm not crazy, I was testing a compiler) I've encountered the following problem:
gcc -Wp,-MD,Documentation/networking/.ifenslave.d -w -O3 -fomit-frame-pointer     -o Documentation/networking/ifenslave Documentation/networking/ifenslave.c
Documentation/networking/ifenslave.c: In function ‘get_drv_info’:
Documentation/networking/ifenslave.c:617: error: ‘BOND_ABI_VERSION’ undeclared (first use in this function)
Documentation/networking/ifenslave.c:617: error: (Each undeclared identifier is reported only once

For some reason -I for kernel include directory was missing.
Adding
HOSTCFLAGS_ifenslave.o += -I$(objtree)/usr/include
to Documentation/networking/Makefile solved the problem.

PS I've no freaking idea what this ifenslave is about, I just thought I should report that.
Comment 1 Randy Dunlap 2011-01-01 03:50:23 UTC
I can't reproduce this problem, but I agree with your "patch".
Other HOST builds in Documentation/ do set HOSTCFLAGS,
so it looks like ifenslave should do the same.

Would you care to generate a proper patch for this
or shall I do it?

Thanks.
Comment 2 Randy Dunlap 2011-02-11 00:31:15 UTC
Patch sent to netdev mailing list:
http://marc.info/?l=linux-netdev&m=129738410231488&w=2
Comment 3 Florian Mickler 2011-02-20 00:05:49 UTC
merged in (soon to be) .38-rc6: 
commit 520732af9158308e96245b54f1d573861eafb631
Author: Randy Dunlap <randy.dunlap@oracle.com>
Date:   Thu Feb 10 20:05:25 2011 -0800

    net: fix ifenslave build flags