2022-06-05 03:05:04 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2021-08-12 19:40:25 +02:00
|
|
|
From: =?UTF-8?q?Martin=20B=C5=99=C3=ADza?= <m@rtinbriza.cz>
|
|
|
|
Date: Wed, 15 Dec 2021 19:38:27 +0100
|
2022-06-05 03:05:04 +02:00
|
|
|
Subject: [PATCH] Disable shared memory and semaphores
|
2021-08-12 19:40:25 +02:00
|
|
|
|
|
|
|
It's probably not done in the cleanest way but it works
|
|
|
|
---
|
|
|
|
mkspecs/serenity-g++/qplatformdefs.h | 3 +++
|
|
|
|
src/corelib/kernel/qsharedmemory_p.h | 3 ++-
|
|
|
|
src/corelib/kernel/qsystemsemaphore_p.h | 1 +
|
|
|
|
3 files changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/mkspecs/serenity-g++/qplatformdefs.h b/mkspecs/serenity-g++/qplatformdefs.h
|
2022-06-05 03:05:04 +02:00
|
|
|
index 1f0dd98..65b641e 100644
|
2021-08-12 19:40:25 +02:00
|
|
|
--- a/mkspecs/serenity-g++/qplatformdefs.h
|
|
|
|
+++ b/mkspecs/serenity-g++/qplatformdefs.h
|
2022-06-05 03:05:04 +02:00
|
|
|
@@ -43,6 +43,9 @@
|
2021-08-12 19:40:25 +02:00
|
|
|
|
|
|
|
#define _GLIBCXX_HAVE_MBSTATE_T 1
|
|
|
|
|
|
|
|
+#define QT_NO_SHAREDMEMORY 1
|
|
|
|
+#define QT_NO_SYSTEMSEMAPHORE 1
|
|
|
|
+
|
|
|
|
#include "qglobal.h"
|
|
|
|
|
|
|
|
// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
|
|
|
|
diff --git a/src/corelib/kernel/qsharedmemory_p.h b/src/corelib/kernel/qsharedmemory_p.h
|
2022-06-05 03:05:04 +02:00
|
|
|
index e06e7e8..7292782 100644
|
2021-08-12 19:40:25 +02:00
|
|
|
--- a/src/corelib/kernel/qsharedmemory_p.h
|
|
|
|
+++ b/src/corelib/kernel/qsharedmemory_p.h
|
|
|
|
@@ -51,6 +51,7 @@
|
|
|
|
// We mean it.
|
|
|
|
//
|
|
|
|
|
|
|
|
+#include "qplatformdefs.h"
|
|
|
|
#include "qsharedmemory.h"
|
|
|
|
|
|
|
|
#include <QtCore/qstring.h>
|
|
|
|
@@ -78,7 +79,7 @@ QT_END_NAMESPACE
|
|
|
|
# include "private/qobject_p.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
-#if !defined(Q_OS_WIN) && !defined(Q_OS_ANDROID) && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_RTEMS)
|
|
|
|
+#if !defined(Q_OS_WIN) && !defined(Q_OS_ANDROID) && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_RTEMS) && !defined(Q_OS_SERENITY)
|
|
|
|
# include <sys/sem.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
diff --git a/src/corelib/kernel/qsystemsemaphore_p.h b/src/corelib/kernel/qsystemsemaphore_p.h
|
2022-06-05 03:05:04 +02:00
|
|
|
index 56619d7..56cf868 100644
|
2021-08-12 19:40:25 +02:00
|
|
|
--- a/src/corelib/kernel/qsystemsemaphore_p.h
|
|
|
|
+++ b/src/corelib/kernel/qsystemsemaphore_p.h
|
|
|
|
@@ -51,6 +51,7 @@
|
|
|
|
// We mean it.
|
|
|
|
//
|
|
|
|
|
|
|
|
+#include "qplatformdefs.h"
|
|
|
|
#include "qsystemsemaphore.h"
|
|
|
|
|
|
|
|
#ifndef QT_NO_SYSTEMSEMAPHORE
|