diff --git a/src/os.cc b/src/os.cc index b9451b0c..11ea8162 100644 --- a/src/os.cc +++ b/src/os.cc @@ -18,6 +18,10 @@ # include # include +# ifdef _WRS_KERNEL //added VxWorks7 kernel support +# include // header file for getpagesize() +# endif + # ifndef _WIN32 # include # else @@ -351,7 +355,12 @@ long getpagesize() { GetSystemInfo(&si); return si.dwPageSize; # else +# ifdef _WRS_KERNEL + long size = FMT_POSIX_CALL(getpagesize()); +# else long size = FMT_POSIX_CALL(sysconf(_SC_PAGESIZE)); +# endif + if (size < 0) FMT_THROW(system_error(errno, FMT_STRING("cannot get memory page size"))); return size;