diff options
author | ngie <ngie@FreeBSD.org> | 2016-01-06 20:27:55 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2016-01-06 20:27:55 +0000 |
commit | bb1abe544baf21654f3c558d31b279995727aa38 (patch) | |
tree | db5d9d3e963f031360609f9d1cd93c56d1f27dc9 | |
parent | d42686c8e06e5c0ff53de7112114f4d98755baa6 (diff) | |
download | FreeBSD-src-bb1abe544baf21654f3c558d31b279995727aa38.zip FreeBSD-src-bb1abe544baf21654f3c558d31b279995727aa38.tar.gz |
MFC r288961,r288962:
r288961 (by bdrewery):
Fix build with older GCC which, doesn't like 'main' being a variable name.
r288962 (by jhb):
Tweak: use 'mainlwp' instead of 'mainpid' since this is a thread (LWP)
identifier, not a pid.
-rw-r--r-- | tests/sys/kern/ptrace_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/sys/kern/ptrace_test.c b/tests/sys/kern/ptrace_test.c index 1731698..1be1144 100644 --- a/tests/sys/kern/ptrace_test.c +++ b/tests/sys/kern/ptrace_test.c @@ -1017,7 +1017,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 mainlwp; int status; ATF_REQUIRE((fpid = fork()) != -1); @@ -1040,7 +1040,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; + mainlwp = pl.pl_lwpid; /* * Continue the child ignoring the SIGSTOP and tracing all @@ -1065,7 +1065,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 != mainlwp) /* New thread seen. */ break; |