Correct build on systems without PAGE_MASK

* exec/exec.c (write_load_command) <PAGE_MASK, PAGE_SIZE>:
Uniformly define even if !HAVE_GETPAGESIZE.
This commit is contained in:
Po Lu 2023-09-18 14:14:20 +08:00
parent cd69120731
commit b331bf6d8a

View file

@ -309,10 +309,10 @@ write_load_command (program_header *header, bool use_alternate,
#else /* HAVE_GETPAGESIZE */
if (!pagesize)
pagesize = sysconf (_SC_PAGESIZE);
#endif /* HAVE_GETPAGESIZE */
#define PAGE_MASK (~(pagesize - 1))
#define PAGE_SIZE (pagesize)
#endif /* HAVE_GETPAGESIZE */
#endif /* PAGE_MASK */
start = header->p_vaddr & PAGE_MASK;