Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
Kopete
Commits
545504ab
Commit
545504ab
authored
May 21, 2014
by
Pali Rohár
Browse files
Allow to build libjingle on unknown architectures
Thanks Pino Toscano for patch!
BUG: 323312
parent
d1b2df91
Changes
3
Hide whitespace changes
Inline
Side-by-side
protocols/jabber/googletalk/libjingle/patches/06_libjingle_unknown_architecture.patch
0 → 100644
View file @
545504ab
--- a/protocols/jabber/googletalk/libjingle/talk/base/systeminfo.cc
+++ b/protocols/jabber/googletalk/libjingle/talk/base/systeminfo.cc
@@ -102,7 +102,7 @@
SystemInfo::SystemInfo()
#elif defined(CPU_X86)
cpu_arch_ = SI_ARCH_X86;
#else
-#error "Unknown architecture."
+ cpu_arch_ = SI_ARCH_UNKNOWN;
#endif
#ifdef WIN32
@@ -144,8 +144,8 @@
SystemInfo::SystemInfo()
proc_info.GetNumCpus(&logical_cpus_);
proc_info.GetNumPhysicalCpus(&physical_cpus_);
proc_info.GetCpuFamily(&cpu_family_);
-#if !defined(__arm__)
- // These values aren't found on ARM systems.
+#if defined(CPU_X86)
+ // These values only apply to x86 systems.
proc_info.GetSectionIntValue(0, "model", &cpu_model_);
proc_info.GetSectionIntValue(0, "stepping", &cpu_stepping_);
proc_info.GetSectionIntValue(0, "cpu MHz", &cpu_speed_);
--- a/protocols/jabber/googletalk/libjingle/talk/base/systeminfo.h
+++ b/protocols/jabber/googletalk/libjingle/talk/base/systeminfo.h
@@ -37,6 +37,7 @@
namespace talk_base {
class SystemInfo {
public:
enum Architecture {
+ SI_ARCH_UNKNOWN = -1,
SI_ARCH_X86 = 0,
SI_ARCH_X64 = 1,
SI_ARCH_ARM = 2
protocols/jabber/googletalk/libjingle/talk/base/systeminfo.cc
View file @
545504ab
...
...
@@ -102,7 +102,7 @@ SystemInfo::SystemInfo()
#elif defined(CPU_X86)
cpu_arch_
=
SI_ARCH_X86
;
#else
#error "Unknown architecture."
cpu_arch_
=
SI_ARCH_UNKNOWN
;
#endif
#ifdef WIN32
...
...
@@ -144,8 +144,8 @@ SystemInfo::SystemInfo()
proc_info
.
GetNumCpus
(
&
logical_cpus_
);
proc_info
.
GetNumPhysicalCpus
(
&
physical_cpus_
);
proc_info
.
GetCpuFamily
(
&
cpu_family_
);
#if
!
defined(
__arm__
)
// These values
aren't found on ARM
systems.
#if defined(
CPU_X86
)
// These values
only apply to x86
systems.
proc_info
.
GetSectionIntValue
(
0
,
"model"
,
&
cpu_model_
);
proc_info
.
GetSectionIntValue
(
0
,
"stepping"
,
&
cpu_stepping_
);
proc_info
.
GetSectionIntValue
(
0
,
"cpu MHz"
,
&
cpu_speed_
);
...
...
protocols/jabber/googletalk/libjingle/talk/base/systeminfo.h
View file @
545504ab
...
...
@@ -37,6 +37,7 @@ namespace talk_base {
class
SystemInfo
{
public:
enum
Architecture
{
SI_ARCH_UNKNOWN
=
-
1
,
SI_ARCH_X86
=
0
,
SI_ARCH_X64
=
1
,
SI_ARCH_ARM
=
2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment