From 791af36eb6a012c6d832d543484a9f574fd1ddd1 Mon Sep 17 00:00:00 2001 From: Roberto Scolaro Date: Tue, 24 Oct 2023 19:14:22 +0000 Subject: [PATCH] wip windows: page size workaround Signed-off-by: Roberto Scolaro --- userspace/falco/app/actions/print_page_size.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/userspace/falco/app/actions/print_page_size.cpp b/userspace/falco/app/actions/print_page_size.cpp index 508c6252bdd..0c4e3ba2d94 100644 --- a/userspace/falco/app/actions/print_page_size.cpp +++ b/userspace/falco/app/actions/print_page_size.cpp @@ -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");