Skip to content
Snippets Groups Projects
Commit c0c35168 authored by xloem's avatar xloem Committed by Axel Naumann
Browse files

Protect possibly predefined preprocessor symbol

On my systems (RHEL7 and Android Termux) PAGE_SIZE is defined to 4096 in /usr/include/sys/user.h .  The enum then produces a compile-term error.
Adding this change resolves this error for me.
parent 6f79a413
No related branches found
No related tags found
No related merge requests found
......@@ -297,7 +297,9 @@ namespace cling {
if (IsValid) {
// If we're gonnd do this, better make sure the end is valid too
// FIXME: getpagesize() & GetSystemInfo().dwPageSize might be better
#if !defined(PAGE_SIZE)
enum { PAGE_SIZE = 1024 };
#endif
while (!(IsValid = utils::isAddressValid(End)) && N > 1024) {
N -= PAGE_SIZE;
End = Start + N;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment