asm/generic: fix bug - kernel fails to build when enable some common audit code on Blackfin
Subsystems (2)
PATCH 1/1 asm/generic: fix bug - kernel fails to build when enable some common audit code on Blackfin
From: Mike Frysinger <[email protected]>
If you enable some common audit code, the kernel fails to build.
In file included from lib/audit.c:17:include/asm-generic/audit_write.h:3: error: '__NR_swapon' undeclared here (not in a function) make[1]: *** [lib/audit.o] Error 1
make: *** [lib] Error 2
So do not use __NR_swapon if it isnt defined for a port.
--- include/asm-generic/audit_write.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
include/asm-generic/audit_write.h +2 -0
@@ -1,6 +1,8 @@#include <asm-generic/audit_dir_write.h> __NR_acct, +#ifdef __NR_swapon __NR_swapon, +#endif __NR_quotactl, __NR_truncate, #ifdef __NR_truncate64
Signature · 1 line
1.5.6.3
Quoted 22 lines · On Tue, 18 Nov 2008 15:03:49 +0800 Bryan Wu <[email protected]> wrote:
From: Mike Frysinger <[email protected]>
If you enable some common audit code, the kernel fails to build.
In file included from
lib/audit.c:17:include/asm-generic/audit_write.h:3: error: '__NR_swapon' undeclared here (not in a function) make[1]: *** [lib/audit.o] Error 1
make: *** [lib] Error 2So do not use
__NR_swaponif it isnt defined for a port.Signed-off-by Mike Frysinger <[email protected]>Signed-off-by Bryan Wu <[email protected]>--- include/asm-generic/audit_write.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)include/asm-generic/audit_write.h +0
-0
include/asm-generic/audit_write.h line 8
Quoted 8 lines
include/asm-generic/audit_write.h +2
-0@@ -1,6 +1,8 @@#include <asm-generic/audit_dir_write.h> __NR_acct, +#ifdef __NR_swapon __NR_swapon, +#endif __NR_quotactl, __NR_truncate, #ifdef __NR_truncate64
hrm.
Should blackfin define __NR_swapon instead? afacit include/asm/unistd.h is an exported-to-userspace header, so the architecture should export __NR_swapon to prevent userspace build failures?
Quoted 12 lines · Andrew Morton
include/asm-generic/audit_write.h line 8
Quoted 9 lines
include/asm-generic/audit_write.h +2
-0@@ -1,6 +1,8 @@#include <asm-generic/audit_dir_write.h> __NR_acct, +#ifdef __NR_swapon __NR_swapon, +#endif __NR_quotactl, __NR_truncate, #ifdef __NR_truncate64hrm.
Quoted 4 lines
Should blackfin define
__NR_swaponinstead? afacitinclude/asm/unistd.his an exported-to-userspace header, so the architecture should export__NR_swaponto prevent userspace build failures?
Not in the absense of syscall in question. Patch applied, will push the tree tomorrow.
Quoted 33 lines · Andrew Morton
Quoted 21 lines · On Tue, 18 Nov 2008 15:03:49 +0800 Bryan Wu wrote:
From: Mike Frysinger <[email protected]>
If you enable some common audit code, the kernel fails to build.In file included from
lib/audit.c:17:include/asm-generic/audit_write.h:3: error: '__NR_swapon' undeclared here (not in a function) make[1]: *** [lib/audit.o] Error 1
make: *** [lib] Error 2So do not use
__NR_swaponif it isnt defined for a port.Signed-off-by Mike Frysinger <[email protected]>Signed-off-by Bryan Wu <[email protected]>--- include/asm-generic/audit_write.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)include/asm-generic/audit_write.h +0
-0include/asm-generic/audit_write.h line 8
Quoted 8 lines
include/asm-generic/audit_write.h +2
-0@@ -1,6 +1,8 @@#include <asm-generic/audit_dir_write.h> __NR_acct, +#ifdef __NR_swapon __NR_swapon, +#endif __NR_quotactl, __NR_truncate, #ifdef __NR_truncate64hrm.
Quoted 4 lines
Should blackfin define
__NR_swaponinstead? afacitinclude/asm/unistd.his an exported-to-userspace header, so the architecture should export__NR_swaponto prevent userspace build failures?
i dont think ports should be forced to define syscalls they dont support. no-mmu cant do swap, so Blackfin doesnt define it ... -mike