Skip to content

Commit

Permalink
[rust] Check whether PROC_ASLR_STATUS is defined
Browse files Browse the repository at this point in the history
For compatibility withe FreeBSD 11.
  • Loading branch information
nikic committed Feb 13, 2022
1 parent 4b7c1b4 commit 3f5ab0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2185,7 +2185,7 @@ void CheckASLR() {
CHECK_NE(personality(old_personality | ADDR_NO_RANDOMIZE), -1);
ReExec();
}
#elif SANITIZER_FREEBSD
#elif SANITIZER_FREEBSD && defined(PROC_ASLR_STATUS)
int aslr_status;
if (UNLIKELY(procctl(P_PID, 0, PROC_ASLR_STATUS, &aslr_status) == -1)) {
// We're making things less 'dramatic' here since
Expand Down

0 comments on commit 3f5ab0c

Please sign in to comment.