Files
haikuports/app-crypt/qca/patches/qca-2.2.1.patchset
Joachim Mairböck 5656b043e5 qca: fix build (#9953)
no rev-bump because an update is pending anyway with #9941
2024-01-06 17:03:34 +01:00

88 lines
2.1 KiB
Plaintext

From 2b7dc2829d4e9fa181032bdc16ba38b2487c09d0 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Tue, 13 Oct 2015 12:07:31 +0300
Subject: QCA2: fix compilation on Haiku/GCC4.
diff --git a/src/botantools/botan/ml_unix/mlock.cpp b/src/botantools/botan/ml_unix/mlock.cpp
index 109609c..c88b23b 100644
--- a/src/botantools/botan/ml_unix/mlock.cpp
+++ b/src/botantools/botan/ml_unix/mlock.cpp
@@ -52,7 +52,9 @@ namespace Botan {
*************************************************/
void lock_mem(void* ptr, u32bit bytes)
{
+ #ifndef __HAIKU__
mlock(ptr, bytes);
+ #endif
}
/*************************************************
@@ -60,7 +62,9 @@ void lock_mem(void* ptr, u32bit bytes)
*************************************************/
void unlock_mem(void* ptr, u32bit bytes)
{
+ #ifndef __HAIKU__
munlock(ptr, bytes);
+ #endif
}
}
diff --git a/src/qca_tools.cpp b/src/qca_tools.cpp
index cef2b79..44357c0 100644
--- a/src/qca_tools.cpp
+++ b/src/qca_tools.cpp
@@ -44,11 +44,13 @@ static bool can_lock()
#endif
MLOCK_TYPE d = MLOCK_TYPE_CAST malloc(256);
+ #ifndef __HAIKU__
if(mlock(d, 256) == 0)
{
munlock(d, 256);
ok = true;
}
+ #endif
free(d);
return ok;
#else
diff --git a/src/support/console.cpp b/src/support/console.cpp
index ee94998..f352dda 100644
--- a/src/support/console.cpp
+++ b/src/support/console.cpp
@@ -30,7 +30,7 @@
#ifdef Q_OS_WIN
# include <windows.h>
#else
-# ifdef Q_OS_ANDROID
+# if defined(Q_OS_ANDROID) || defined(Q_OS_HAIKU)
# include <termios.h>
# else
# include <sys/termios.h>
--
2.42.1
From aa4efeb86d5dc71e69a9d609c4274933929c7a8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
Date: Sat, 6 Jan 2024 14:50:37 +0100
Subject: add missing #include <memory> for shared_ptr
diff --git a/src/qca_default.cpp b/src/qca_default.cpp
index 0499bbc..d63977f 100644
--- a/src/qca_default.cpp
+++ b/src/qca_default.cpp
@@ -30,6 +30,8 @@
# include "qca_systemstore.h"
#endif
+#include <memory>
+
#define FRIENDLY_NAMES
namespace QCA {
--
2.42.1