diff options
Diffstat (limited to 'vcpkg/ports/mman/mman-static.patch')
| -rw-r--r-- | vcpkg/ports/mman/mman-static.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/vcpkg/ports/mman/mman-static.patch b/vcpkg/ports/mman/mman-static.patch new file mode 100644 index 0000000..ce7be49 --- /dev/null +++ b/vcpkg/ports/mman/mman-static.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4696ad4..a72bbce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,6 +8,10 @@ option (BUILD_TESTS "tests?" OFF) + set (headers mman.h) + set (sources mman.c) + ++if(NOT BUILD_SHARED_LIBS) ++ add_definitions(-DMMANSHARED_EXPORT=) ++endif() ++ + add_library (mman ${sources}) + + install (TARGETS mman RUNTIME DESTINATION bin +diff --git a/mman.h b/mman.h +index 4065bc6..435ea26 100644 +--- a/mman.h ++++ b/mman.h +@@ -15,11 +15,13 @@ + #include <_mingw.h> + #endif + ++#if !defined(MMANSHARED_EXPORT) + #if defined(MMAN_LIBRARY) + #define MMANSHARED_EXPORT __declspec(dllexport) + #else + #define MMANSHARED_EXPORT __declspec(dllimport) + #endif ++#endif + + /* Determine offset type */ + #include <stdint.h> |