Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 55110 - Linux 2.6.6 audit.h field nlh has incomplete type
Summary: Linux 2.6.6 audit.h field nlh has incomplete type
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Tim Yamin (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-24 21:13 UTC by Nick Downing
Modified: 2004-06-27 11:43 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Downing 2004-06-24 21:13:56 UTC
I couldn't compile Samba under kernel 2.6.6, I believe other applications would also be affected.  The error message was as follows:

/usr/include/linux/audit.h:101: error: field 'nlh' has incomplete type

I fixed it by editing the kernel source, in file /usr/include/linux/audit.h,
this would be found also as /usr/src/linux-2.6.6/include/linux/audit.h since I have placed symlinks in /usr/include to access the kernel source directly.

The problem is fixed by applying the following patch to audit.h:

--- audit.h!	2004-06-25 13:58:01.604565680 +1000
+++ audit.h	2004-06-25 13:57:46.334887024 +1000
@@ -97,6 +97,7 @@
 #define AUDIT_FAIL_PANIC	2
 
 #ifndef __KERNEL__
+#include <linux/netlink.h> /* Nick */
 struct audit_message {
 	struct nlmsghdr nlh;
 	char		data[1200];

cheers all
Comment 1 Greg Kroah-Hartman (RETIRED) gentoo-dev 2004-06-25 08:49:31 UTC
We aren't patching kernel files to let userspace build :(
Comment 2 Nick Downing 2004-06-25 12:46:03 UTC
Ah OK.. I guess for now, we could try to patch userspace packages so that:

#include <linux/audit.h>

becomes:

#include <linux/netlink.h>
#include <linux/audit.h>

It's just that there might be quite a few of them.  How about we also pass this bugreport upstream to the kernel developers and let them do whatever?  Both solutions can coexist, as the headers are protected from multiple inclusion.
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2004-06-25 13:29:46 UTC
It's fixed with linux-headers-2.6.7 since I put them into Portage... I'll backport this into 2.6.6.
Comment 4 Tim Yamin (RETIRED) gentoo-dev 2004-06-26 09:30:09 UTC
Hm; well the 2.6.6 headers already include this fix so I must have added it in earlier when I released them. I'm closing this as INVALID for two reasons: 

Firstly, we don't support users running arbitrary 2.6 headers [ Use sys-kernel/linux-headers-2.6* if you need supported 2.6 headers ]...

Secondly, as Greg's said we're not going to patch any kernels for userspace support - our headers are specially designated for that so if you have any issues with them then please file a bug and assign it to me. Thanks!
Comment 5 Nick Downing 2004-06-27 11:43:38 UTC
Ahh fair enough, I didn't know that a headers package was available for 2.6 ... you learn something new every day.  In philosophical terms I'm not totally sure that I agree with the policy but I guess there's no point changing direction halfway through.  Keep up the good work dudes.  I'll be back to bother you again ;)