]> granicus.if.org Git - icinga2/commitdiff
Build fix for Win64
authorGunnar Beutner <gunnar@beutner.name>
Tue, 29 Mar 2016 05:54:41 +0000 (07:54 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 29 Mar 2016 05:54:41 +0000 (07:54 +0200)
refs #11462

lib/base/objectlock.hpp
lib/base/string-script.cpp

index 2ef73ecf61e0dfd25995e599825076a6d2f9a904..ea2e05484ad1d8a802c175ab819e663b8aa111f7 100644 (file)
@@ -62,7 +62,7 @@ public:
 
 #ifdef _WIN32
 #      ifdef _WIN64
-               while (InterlockedCompareExchange64(&object->m_Mutex, I2MUTEX_LOCKED, I2MUTEX_UNLOCKED) != I2MUTEX_UNLOCKED) {
+               while (InterlockedCompareExchange64((LONGLONG *)&object->m_Mutex, I2MUTEX_LOCKED, I2MUTEX_UNLOCKED) != I2MUTEX_UNLOCKED) {
 #      else /* _WIN64 */
                while (InterlockedCompareExchange(&object->m_Mutex, I2MUTEX_LOCKED, I2MUTEX_UNLOCKED) != I2MUTEX_UNLOCKED) {
 #      endif /* _WIN64 */
@@ -84,7 +84,7 @@ public:
                mtx->lock();
 #ifdef _WIN32
 #      ifdef _WIN64
-               InterlockedCompareExchange64(&object->m_Mutex, reinterpret_cast<LONGLONG>(mtx), I2MUTEX_LOCKED);
+               InterlockedCompareExchange64((LONGLONG *)&object->m_Mutex, reinterpret_cast<LONGLONG>(mtx), I2MUTEX_LOCKED);
 #      else /* _WIN64 */
                InterlockedCompareExchange(&object->m_Mutex, reinterpret_cast<LONG>(mtx), I2MUTEX_LOCKED);
 #      endif /* _WIN64 */
index 83aef1b19bb108423c68f69d0205d3dd86fa19ee..7ea1c91ab6980216b3ffdbdb950b1cd1af2a197c 100644 (file)
@@ -86,7 +86,7 @@ static Array::Ptr StringSplit(const String& delims)
        return result;
 }
 
-static Value StringFind(const std::vector<Value>& args)
+static int StringFind(const std::vector<Value>& args)
 {
        ScriptFrame *vframe = ScriptFrame::GetCurrentFrame();
        String self = vframe->Self;