浏览代码

seccomp: use a static inline for a function stub

Fixes this error message when CONFIG_SECCOMP is not set:

arch/powerpc/kernel/ptrace.c: In function 'do_syscall_trace_enter':
arch/powerpc/kernel/ptrace.c:1713:2: error: statement with no effect [-Werror=unused-value]

Signed-off-by: Stephen Rothwell <sfr@ozlabs.au.ibm.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Stephen Rothwell 13 年之前
父节点
当前提交
b1fa650c7e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/linux/seccomp.h

+ 1 - 1
include/linux/seccomp.h

@@ -90,7 +90,7 @@ static inline int seccomp_mode(struct seccomp *s)
 struct seccomp { };
 struct seccomp_filter { };
 
-#define secure_computing(x) 0
+static inline int secure_computing(int this_syscall) { return 0; }
 
 static inline long prctl_get_seccomp(void)
 {