mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-31 22:28:22 +00:00
fix(userpsace/falco): print page size on windows
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
This commit is contained in:
@@ -24,7 +24,15 @@ falco::app::run_result falco::app::actions::print_page_size(falco::app::state& s
|
||||
{
|
||||
if(s.options.print_page_size)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
long page_size = getpagesize();
|
||||
#else
|
||||
SYSTEM_INFO sysInfo;
|
||||
|
||||
GetSystemInfo(&sysInfo);
|
||||
|
||||
long page_size = sysInfo.dwPageSize;
|
||||
#endif
|
||||
if(page_size <= 0)
|
||||
{
|
||||
return run_result::fatal("\nUnable to get the system page size through 'getpagesize()'\n");
|
||||
|
Reference in New Issue
Block a user