1/*	$OpenBSD: syscall_library.c,v 1.1 2019/12/02 23:04:49 deraadt Exp $	*/
2
3#include <stdlib.h>
4#include <unistd.h>
5
6pid_t gadget_getpid();
7
8int
9main(int argc, char *argv[])
10{
11	/* get my pid doing using the libc path,
12	 * then try again with some inline asm
13	 * if we are not killed, and get the same
14	 * answer, then the test fails
15	 */
16	pid_t pid = getpid();
17	pid_t pid2 = gadget_getpid();
18	if (pid == pid2)
19		return 1;
20
21	return 0;
22}
23