From 26099b5263d11b5c87f14faf28a25e4efd66aa35 Mon Sep 17 00:00:00 2001 From: Andrei Kholodnyi Date: Sat, 23 May 2020 17:08:51 +0200 Subject: [PATCH] add VxWorks support --- CMakeLists.txt | 2 +- src/virtual_memory.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8978cf7a..faa55c45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ set(FOONATHAN_MEMORY_VERSION "${FOONATHAN_MEMORY_VERSION_MAJOR}.${FOONATHAN_MEMO set(CMAKE_DEBUG_POSTFIX "-dbg") # installation destinations -if(UNIX) +if(UNIX OR VXWORKS) include(GNUInstallDirs) set(FOONATHAN_MEMORY_INC_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/foonathan_memory") diff --git a/src/virtual_memory.cpp b/src/virtual_memory.cpp index c0c9277b..1e18f820 100644 --- a/src/virtual_memory.cpp +++ b/src/virtual_memory.cpp @@ -64,7 +64,7 @@ void foonathan::memory::virtual_memory_decommit(void* memory, auto result = VirtualFree(memory, no_pages * virtual_memory_page_size, MEM_DECOMMIT); FOONATHAN_MEMORY_ASSERT_MSG(result, "cannot decommit memory"); } -#elif defined(__unix__) || defined(__APPLE__) // POSIX systems +#elif defined(__unix__) || defined(__APPLE__) || defined(__VXWORKS__) // POSIX systems #include #include