diff --git a/winpr/libwinpr/interlocked/CMakeLists.txt b/winpr/libwinpr/interlocked/CMakeLists.txt index b944c5d7c..431834bc4 100644 --- a/winpr/libwinpr/interlocked/CMakeLists.txt +++ b/winpr/libwinpr/interlocked/CMakeLists.txt @@ -22,7 +22,11 @@ set(${MODULE_PREFIX}_SRCS interlocked.c) if(MSVC AND (NOT MONOLITHIC_BUILD)) - set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) + if (${CMAKE_SYSTEM_VERSION} GREATER "5.1") + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) + else() + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module_5.1.def) + endif() endif() add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT" diff --git a/winpr/libwinpr/interlocked/module.def b/winpr/libwinpr/interlocked/module.def index 160c9de80..39f295109 100644 --- a/winpr/libwinpr/interlocked/module.def +++ b/winpr/libwinpr/interlocked/module.def @@ -1,6 +1,7 @@ LIBRARY "libwinpr-interlocked" EXPORTS - InterlockedCompareExchange64 @1 + ; Not required on windows > 5.1 + ; InterlockedCompareExchange64 @1 InitializeListHead @2 IsListEmpty @3 RemoveEntryList @4 diff --git a/winpr/libwinpr/interlocked/module_5.1.def b/winpr/libwinpr/interlocked/module_5.1.def new file mode 100644 index 000000000..160c9de80 --- /dev/null +++ b/winpr/libwinpr/interlocked/module_5.1.def @@ -0,0 +1,13 @@ +LIBRARY "libwinpr-interlocked" +EXPORTS + InterlockedCompareExchange64 @1 + InitializeListHead @2 + IsListEmpty @3 + RemoveEntryList @4 + InsertHeadList @5 + RemoveHeadList @6 + InsertTailList @7 + RemoveTailList @8 + AppendTailList @9 + PushEntryList @10 + PopEntryList @11