[PATCH] syscall/prctl.c: Fix unused variable build error with USE_SECCOMP=0.

Vinson Lee <[email protected]>
Newsgroups org.kernel.vger.trinity
Message-ID <[email protected]>
From: Vinson Lee <[email protected]>

This patch fixes this build error on CentOS 6.

  CC	syscalls/prctl.o
cc1: warnings being treated as errors
syscalls/prctl.c: In function ‘sanitise_prctl’:
syscalls/prctl.c:36: error: unused variable ‘saddr’

Signed-off-by: Vinson Lee <[email protected]>
---
 syscalls/prctl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/syscalls/prctl.c b/syscalls/prctl.c
index acca027..bde76aa 100644
--- a/syscalls/prctl.c
+++ b/syscalls/prctl.c
@@ -33,7 +33,9 @@ static int prctl_opts[NR_PRCTL_OPTS] = {
 void sanitise_prctl(int childno)
 {
 	int option = prctl_opts[rand() % NR_PRCTL_OPTS];
+#ifdef USE_SECCOMP
 	struct sockaddr *saddr = NULL;
+#endif
 
 // For now, just do SECCOMP, the other options need some attention.
 option = PR_SET_SECCOMP;
-- 
1.7.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.