summaryrefslogtreecommitdiff
path: root/debian/patches/50_kfreebsd_build_fix.diff
blob: 03a9cb49272c207b97932a0d6b54c313197c3cc0 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
author: Petr Salinger <Petr.Salinger@seznam.cz>

Fixes FTBFS on GNU/kFreeBSD by creating new Q_OS_GLIBC.

--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -204,6 +204,12 @@ namespace QT_NAMESPACE {}
 #  define Q_OS_RELIANT
 #elif defined(__linux__) || defined(__linux)
 #  define Q_OS_LINUX
+#  define Q_OS_GLIBC
+#elif defined(__GNU_HURD__) || defined(__GNU__)
+#  define Q_OS_HURD
+#  define Q_OS_GLIBC
+#elif defined(__GLIBC__)
+#  define Q_OS_GLIBC
 #elif defined(__FreeBSD__) || defined(__DragonFly__)
 #  define Q_OS_FREEBSD
 #  define Q_OS_BSD4
@@ -224,8 +230,6 @@ namespace QT_NAMESPACE {}
 #  define Q_OS_AIX
 #elif defined(__Lynx__)
 #  define Q_OS_LYNX
-#elif defined(__GNU__)
-#  define Q_OS_HURD
 #elif defined(__DGUX__)
 #  define Q_OS_DGUX
 #elif defined(__QNXNTO__)
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -286,13 +286,13 @@ static bool qt_parse_pattern(const char 
 
 #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(QT_NO_PLUGIN_CHECK)
 
-#if defined(Q_OS_FREEBSD) || defined(Q_OS_LINUX)
+#if defined(Q_OS_FREEBSD) || defined(Q_OS_GLIBC)
 #  define USE_MMAP
 QT_BEGIN_INCLUDE_NAMESPACE
 #  include <sys/types.h>
 #  include <sys/mman.h>
 QT_END_INCLUDE_NAMESPACE
-#endif // Q_OS_FREEBSD || Q_OS_LINUX
+#endif // Q_OS_FREEBSD || Q_OS_GLIBC
 
 static long qt_find_pattern(const char *s, ulong s_len,
                              const char *pattern, ulong p_len)
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -74,7 +74,7 @@ QT_END_NAMESPACE
 #include <qdebug.h>
 #include <time.h>
 
-#if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
+#if defined(Q_OS_GLIBC) && !defined(__UCLIBC__)
 #    include <fenv.h>
 #endif
 
@@ -6253,7 +6253,7 @@ Q_CORE_EXPORT char *qdtoa ( double d, in
     _control87(MCW_EM, MCW_EM);
 #endif
 
-#if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
+#if defined(Q_OS_GLIBC) && !defined(__UCLIBC__)
     fenv_t envp;
     feholdexcept(&envp);
 #endif
@@ -6269,7 +6269,7 @@ Q_CORE_EXPORT char *qdtoa ( double d, in
 #endif //_M_X64
 #endif //Q_OS_WIN
 
-#if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
+#if defined(Q_OS_GLIBC) && !defined(__UCLIBC__)
     fesetenv(&envp);
 #endif