diff --git a/soup/memGuard.cpp b/soup/memGuard.cpp index 9ecd5a03..9c53e246 100644 --- a/soup/memGuard.cpp +++ b/soup/memGuard.cpp @@ -45,6 +45,10 @@ NAMESPACE_SOUP } return 0; } +#else + static_assert(PROT_READ == memGuard::ACC_READ); + static_assert(PROT_WRITE == memGuard::ACC_WRITE); + static_assert(PROT_EXEC == memGuard::ACC_EXEC); #endif void* memGuard::alloc(size_t len, int allowed_access) diff --git a/soup/memGuard.hpp b/soup/memGuard.hpp index d1fde23d..1d8c574b 100644 --- a/soup/memGuard.hpp +++ b/soup/memGuard.hpp @@ -14,9 +14,9 @@ NAMESPACE_SOUP { enum AllowedAccessFlags : int { - ACC_READ = 0x01, // equals PROT_READ on Linux - ACC_WRITE = 0x02, // equals PROT_WRITE on Linux - ACC_EXEC = 0x04, // equals PROT_EXEC on Linux + ACC_READ = 0x01, + ACC_WRITE = 0x02, + ACC_EXEC = 0x04, ACC_RWX = ACC_READ | ACC_WRITE | ACC_EXEC };