diff options
author | Eric Paris <eparis@redhat.com> | 2014-04-22 11:46:16 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2014-09-23 16:21:27 -0400 |
commit | a9ebe0b98896b276a3a1664da5f40d3b7c92f316 (patch) | |
tree | a365a82841037600434e88201708989eeb7aca07 | |
parent | 84db564aad45774ab64375ee019d5e7a42675b1f (diff) |
audit: fix build error when asm/syscall.h does not exist
avr32 does not have an asm/syscall.h file. We need the
syscall_get_arch() definition from that file for all arch's which
support CONFIG_AUDITSYSCALL. Obviously avr32 is not one of those
arch's. Move the include inside the CONFIG_AUDITSYSCALL such that we
only do the include if we need the results.
When the syscall_get_arch() call is moved inside __audit_syscall_entry()
this include can be dropped entirely. But that is going to require some
assembly changes on x86* in a patch that is not ready for the tree...
Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
-rw-r--r-- | include/linux/audit.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index bb1c3ab611bf..783157b289e8 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/ptrace.h> | 27 | #include <linux/ptrace.h> |
28 | #include <uapi/linux/audit.h> | 28 | #include <uapi/linux/audit.h> |
29 | #include <asm/syscall.h> | ||
30 | 29 | ||
31 | struct audit_sig_info { | 30 | struct audit_sig_info { |
32 | uid_t uid; | 31 | uid_t uid; |
@@ -110,6 +109,8 @@ extern void audit_log_session_info(struct audit_buffer *ab); | |||
110 | #endif | 109 | #endif |
111 | 110 | ||
112 | #ifdef CONFIG_AUDITSYSCALL | 111 | #ifdef CONFIG_AUDITSYSCALL |
112 | #include <asm/syscall.h> /* for syscall_get_arch() */ | ||
113 | |||
113 | /* These are defined in auditsc.c */ | 114 | /* These are defined in auditsc.c */ |
114 | /* Public API */ | 115 | /* Public API */ |
115 | extern int audit_alloc(struct task_struct *task); | 116 | extern int audit_alloc(struct task_struct *task); |