mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-27 04:41:02 +08:00
Check _dl_pagesize first. Default to 4096, not EXEC_PAGESIZE.
This commit is contained in:
parent
655f4b14c8
commit
f476000f87
@ -28,8 +28,13 @@
|
||||
int
|
||||
__getpagesize ()
|
||||
{
|
||||
extern size_t _dl_pagesize;
|
||||
#ifdef __NR_getpagesize
|
||||
int result;
|
||||
#endif
|
||||
|
||||
if (_dl_pagesize != 0)
|
||||
return _dl_pagesize;
|
||||
|
||||
result = INLINE_SYSCALL (getpagesize, 0);
|
||||
/* The only possible error is ENOSYS. */
|
||||
@ -37,7 +42,7 @@ __getpagesize ()
|
||||
return result;
|
||||
#endif
|
||||
|
||||
return EXEC_PAGESIZE;
|
||||
return 4096;
|
||||
}
|
||||
|
||||
weak_alias (__getpagesize, getpagesize)
|
||||
|
Loading…
Reference in New Issue
Block a user