summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2015-10-06 22:54:04 +0000
committerbdrewery <bdrewery@FreeBSD.org>2015-10-06 22:54:04 +0000
commit52adc6c5049aa4ffa934aeda40651880141dc2dc (patch)
treedadda0c7b6470cc8aea560de67cd57106efe6cd0 /tests
parent1ce120cf1a253d6da6be3dab4ffe5ce99e6d03f1 (diff)
downloadFreeBSD-src-52adc6c5049aa4ffa934aeda40651880141dc2dc.zip
FreeBSD-src-52adc6c5049aa4ffa934aeda40651880141dc2dc.tar.gz
Fix build with older GCC which, doesn't like 'main' being a variable name.
Diffstat (limited to 'tests')
-rw-r--r--tests/sys/kern/ptrace_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/sys/kern/ptrace_test.c b/tests/sys/kern/ptrace_test.c
index 3393a07..ee44575 100644
--- a/tests/sys/kern/ptrace_test.c
+++ b/tests/sys/kern/ptrace_test.c
@@ -1103,7 +1103,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_thread, tc)
{
struct ptrace_lwpinfo pl;
pid_t fpid, wpid;
- lwpid_t main;
+ lwpid_t mainpid;
int status;
ATF_REQUIRE((fpid = fork()) != -1);
@@ -1126,7 +1126,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_thread, tc)
ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl,
sizeof(pl)) != -1);
- main = pl.pl_lwpid;
+ mainpid = pl.pl_lwpid;
/*
* Continue the child ignoring the SIGSTOP and tracing all
@@ -1151,7 +1151,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_thread, tc)
sizeof(pl)) != -1);
ATF_REQUIRE((pl.pl_flags & PL_FLAG_SCX) != 0);
ATF_REQUIRE(pl.pl_syscall_code != 0);
- if (pl.pl_lwpid != main)
+ if (pl.pl_lwpid != mainpid)
/* New thread seen. */
break;
OpenPOWER on IntegriCloud