selinux build failure
selinux/hooks.c won't build on ia64.
2.6.0-test3 + ia64 patch or 2.6.0-test4.
security/selinux/hooks.c: In function `selinux_file_fcntl':security/selinux/hooks.c:2032: error: F_GETLK64' undeclared (first use in this function) security/selinux/hooks.c:2033: error: F_SETLK64' undeclared (first use in this function) security/selinux/hooks.c:2034: error:
`F_SETLKW64' undeclared (first use in this function)
The __64 versions of these are defined in include/asm-ia64/compat.h. I don't see a good way to #include asm/compat.h, nor is it available for all processor architectures.
~Randy
Quoted 9 lines · Randy.Dunlap
selinux/hooks.cwon't build on ia64.
2.6.0-test3 + ia64 patch or 2.6.0-test4.
security/selinux/hooks.c: In function `selinux_file_fcntl':security/selinux/hooks.c:2032: error:F_GETLK64' undeclared (first use in this function) security/selinux/hooks.c:2033: error:F_SETLK64' undeclared (first use in this function)security/selinux/hooks.c:2034: error:
`F_SETLKW64' undeclared (first use in this function)
Quoted 3 lines
The __64 versions of these are defined in
include/asm-ia64/compat.h. I don't see a good way to #includeasm/compat.h, nor is it available for all processor architectures.
It is available via <linux/compat.h> if CONFIG_COMPAT is defined.
Does the patch below fix this for you?
- James
Signature · 14 lines
James Morris <[email protected]> diff -urN -X dontdiff linux-2.6.0-test4.orig/security/selinux/hooks.c linux-2.6.0-test4.w1/security/selinux/hooks.c --- linux-2.6.0-test4.orig/security/selinux/hooks.c 2003-08-23 11:53:14.000000000 +1000 +++ linux-2.6.0-test4.w1/security/selinux/hooks.c 2003-08-25 00:31:58.655604472 +1000 @@ -44,6 +44,7 @@ #include <linux/ext2_fs.h> #include <linux/proc_fs.h> #include <linux/kd.h> +#include <linux/compat.h> #include <net/icmp.h> #include <net/ip.h> /* for sysctl_local_port_range[] */ #include <net/tcp.h> /* struct or_callable used in sock_rcv_skb */
Quoted 6 lines · James Morris
Quoted 2 lines
see a good way to #include
asm/compat.h, nor is it available for all processor architectures.It is available via <
linux/compat.h> ifCONFIG_COMPATis defined.Does the patch below fix this for you?
Argg, this is b0rked. {asm,linux}/compat.h are for the 32bit compatiblity code. 64bit arches don't have fcntl64 - see the #if BITS_PER_LONG = 32 around sys_fcntl64 in fcntl.c..
Quoted 3 lines · Christoph Hellwig
Argg, this is b0rked. {
asm,linux}/compat.hare for the 32bit compatiblity code. 64bit arches don't have fcntl64 - see the #ifBITS_PER_LONG= 32 aroundsys_fcntl64infcntl.c..
Indeed. How about this?
- James
Signature · 18 lines
James Morris <[email protected]> diff -urN -X dontdiff linux-2.6.0-test4.orig/security/selinux/hooks.c linux-2.6.0-test4.w1/security/selinux/hooks.c --- linux-2.6.0-test4.orig/security/selinux/hooks.c 2003-08-23 11:53:14.000000000 +1000 +++ linux-2.6.0-test4.w1/security/selinux/hooks.c 2003-08-25 01:23:11.690432168 +1000 @@ -2057,9 +2057,11 @@ case F_GETLK: case F_SETLK: case F_SETLKW: +#if BITS_PER_LONG = 32 case F_GETLK64: case F_SETLK64: case F_SETLKW64: +#endif if (!file->f_dentry || !file->f_dentry->d_inode) { err = -EINVAL; break;