Telegram: try to fix build

This commit is contained in:
Gerasim Troeglazov
2020-01-06 21:43:13 +10:00
parent c666391e6b
commit 367ed5077c
2 changed files with 72 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
From b14000c6453f734aeafac45f964a11cc37e8f7a7 Mon Sep 17 00:00:00 2001
From d547c14ec5ebc0c39d47459d126c10ec5dc40dc2 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 6 Jan 2020 17:46:10 +1000
Subject: Add Haiku support
@@ -4342,3 +4342,73 @@ index b3d7ff4..37fd1eb 100644
--
2.24.1
From b26ccb6d1df0dd08562c0ee39a42a2a59146c2c4 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 6 Jan 2020 21:41:41 +1000
Subject: Don't include SupportDefs.h
diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp
index 01f7cc4..ae79d2f 100644
--- a/Telegram/SourceFiles/calls/calls_call.cpp
+++ b/Telegram/SourceFiles/calls/calls_call.cpp
@@ -5,6 +5,7 @@ the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
+
#include "calls/calls_call.h"
#include "main/main_session.h"
@@ -27,12 +28,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#define NEED_TO_RESTORE_SLOTS
#endif // slots
-#ifdef __x86_64__
-#define int64 XXX
-#define uint64 YYY
-#else
-#define int32 XXX
-#define uint32 YYY
+// Don't include SupportDefs.h
+#ifdef __HAIKU__
+#define _SUPPORT_DEFS_H
+typedef int32 status_t;
+typedef uint32 type_code;
#endif
#include <VoIPController.h>
diff --git a/Telegram/SourceFiles/settings/settings_calls.cpp b/Telegram/SourceFiles/settings/settings_calls.cpp
index 9eb64e8..e592a75 100644
--- a/Telegram/SourceFiles/settings/settings_calls.cpp
+++ b/Telegram/SourceFiles/settings/settings_calls.cpp
@@ -5,6 +5,7 @@ the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
+
#include "settings/settings_calls.h"
#include "settings/settings_common.h"
@@ -31,12 +32,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#define NEED_TO_RESTORE_SLOTS
#endif // slots
-#ifdef __x86_64__
-#define int64 XXX
-#define uint64 YYY
-#else
-#define int32 XXX
-#define uint32 YYY
+// Don't include SupportDefs.h
+#ifdef __HAIKU__
+#define _SUPPORT_DEFS_H
+typedef int32 status_t;
+typedef uint32 type_code;
#endif
#include <VoIPController.h>
--
2.24.1

View File

@@ -3,7 +3,7 @@ DESCRIPTION="Unofficial build of the original Telegram client for Haiku."
HOMEPAGE="https://www.telegram.org/"
COPYRIGHT="2013-2019 Telegram"
LICENSE="GNU GPL v3"
REVISION="1"
REVISION="2"
SOURCE_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v$portVersion/tdesktop-$portVersion-full.tar.gz"
CHECKSUM_SHA256="ca9c67369140952d5ffe404ca082517193e3832b2c21ba1af791f078e4d9a7bb"