File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
libc/src/__support/OSUtil/linux Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -96,15 +96,17 @@ LIBC_INLINE void Vector::fallback_initialize_unsync() {
96
96
}
97
97
size_t avaiable_size = AUXV_MMAP_SIZE - sizeof (Entry);
98
98
99
- // Attempt 1: use PRCTL to get the auxv.
100
- // We guarantee that the vector is always padded with AT_NULL entries.
99
+ // Attempt 1: use PRCTL to get the auxv.
100
+ // We guarantee that the vector is always padded with AT_NULL entries.
101
+ #ifdef PR_GET_AUXV
101
102
long prctl_ret = syscall_impl<long >(SYS_prctl, PR_GET_AUXV,
102
103
reinterpret_cast <unsigned long >(vector),
103
104
avaiable_size, 0 , 0 );
104
105
if (prctl_ret >= 0 ) {
105
106
entries = vector;
106
107
return ;
107
108
}
109
+ #endif
108
110
109
111
// Attempt 2: read /proc/self/auxv.
110
112
#ifdef SYS_openat
You can’t perform that action at this time.
0 commit comments