[OpenAFS-devel] arm linux 26 build issues

Marc Dionne marc.c.dionne@gmail.com
Thu, 7 Oct 2010 14:02:51 -0400


On Thu, Oct 7, 2010 at 9:14 AM, Simon Wilkinson <sxw@inf.ed.ac.uk> wrote:
>
> On 7 Oct 2010, at 08:40, omalleys@msu.edu wrote:
>
>> /home/afs/openafs/src/afs/LINUX/osi_compat.h:158: error: implicit declaration of function ?key_alloc?
>
> Your kernel doesn't have keyring support, and it looks like we may have broken builds in that case.
>
> You could try adding: "#ifdef LINUX_KEYRING_SUPPORT" at line 148 of that file, and a "#endif" at line 200, and see if that helps you build further.
>
> Cheers,
>
> Simon.

We'll probably need the above for the case where keyring support is
not available, but the current setup for the header files could be a
problem even if keyrings are enabled.  I was intrigued as to how we
got key.h included for all files that include osi_compat.h (quite a
few), when currrently osi_groups.c is the only one that specifically
includes key.h.   Looking at a typical pre-processed file on RH5 shows
that we get key.h indirectly from security.h and sysincludes.h.  The
security.h include is conditional on a config test.

This seems too fragile and potentially broken depending on the kernel
version.  Since we need key.h in the keyring case to parse
osi_compat.h for all LINUX specific files, it would be better to have
key.h included in sysincludes.h (where it used to be), or maybe
directly in osi_compat.h.  Thoughts?

Marc