• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <sys/prctl.h>
2 #include <stdarg.h>
3 #include "syscall.h"
4 
5 #ifdef HOOK_ENABLE
6 int __libc_prctl(int op,  ...);
7 #endif
8 
9 #ifdef HOOK_ENABLE
__libc_prctl(int op,...)10 int __libc_prctl(int op,  ...)
11 #else
12 int prctl(int op, ...)
13 #endif
14 {
15 	unsigned long x[4];
16 	int i;
17 	va_list ap;
18 	va_start(ap, op);
19 	for (i=0; i<4; i++) x[i] = va_arg(ap, unsigned long);
20 	va_end(ap);
21 	return syscall(SYS_prctl, op, x[0], x[1], x[2], x[3]);
22 }
23