summaryrefslogtreecommitdiff
path: root/Ports/qt6-qtbase/patches/0002-Disable-shared-memory-and-semaphores.patch
blob: a86f75742044519b808511b1440c4470df4eb03d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20B=C5=99=C3=ADza?= <m@rtinbriza.cz>
Date: Wed, 15 Dec 2021 19:38:27 +0100
Subject: [PATCH] Disable shared memory and semaphores

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
index 1f0dd9819abb1f8dac52250d24aa8d0763f05445..65b641e283a42cdc2bd6c63c1750b46e0b33ab02 100644
--- a/mkspecs/serenity-g++/qplatformdefs.h
+++ b/mkspecs/serenity-g++/qplatformdefs.h
@@ -43,6 +43,9 @@
 
 #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
index 57dcb2cb93eaacf905c585c3fd24a4c9ed07418b..fefcdc9d159163f34642c1b856cf992e93d234bb 100644
--- a/src/corelib/kernel/qsharedmemory_p.h
+++ b/src/corelib/kernel/qsharedmemory_p.h
@@ -15,6 +15,7 @@
 // We mean it.
 //
 
+#include "qplatformdefs.h"
 #include "qsharedmemory.h"
 
 #include <QtCore/qstring.h>
@@ -42,7 +43,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
index 09fbcd2ed65a7f8e7bb9756c02209f0eb96ede44..7267c52b11a5c91e062ad20f357a627ae8888b81 100644
--- a/src/corelib/kernel/qsystemsemaphore_p.h
+++ b/src/corelib/kernel/qsystemsemaphore_p.h
@@ -15,6 +15,7 @@
 // We mean it.
 //
 
+#include "qplatformdefs.h"
 #include "qsystemsemaphore.h"
 
 #ifndef QT_NO_SYSTEMSEMAPHORE