summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-02-05 02:03:15 (GMT)
committer Slávek Banko <slavek.banko@axis.cz>2017-02-05 02:03:15 (GMT)
commit2b3ad7abc100654e0f9b0d6e6f1ebbf219b2ea9e (patch)
tree3b0050f0ca2d9c797742f24fda72ace753d5a9d4
parent311fd504446f6ba994d4fe2c30d9871fd4de0f73 (diff)
downloadknetworkmanager8-2b3ad7ab.zip
knetworkmanager8-2b3ad7ab.tar.gz
Fix detection whether the system is big endian
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--ConfigureChecks.cmake5
-rw-r--r--config.h.cmake4
-rw-r--r--knetworkmanager-0.8/src/sha1.cpp2
3 files changed, 11 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 45509b2..853e0e2 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -9,6 +9,11 @@
#
#################################################
+# little/big endian?
+include(TestBigEndian)
+test_big_endian(WORDS_BIGENDIAN)
+
+
# hal
pkg_search_module( HAL hal )
if( NOT HAL_FOUND )
diff --git a/config.h.cmake b/config.h.cmake
index 97e002c..c992f3f 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -1 +1,5 @@
#define KNETWORKMANAGER_VERSION_STRING "@KNETWORKMANAGER_VERSION@"
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
diff --git a/knetworkmanager-0.8/src/sha1.cpp b/knetworkmanager-0.8/src/sha1.cpp
index 74f4df9..180f4bb 100644
--- a/knetworkmanager-0.8/src/sha1.cpp
+++ b/knetworkmanager-0.8/src/sha1.cpp
@@ -12,6 +12,8 @@
* See README and COPYING for more details.
*/
+#include "config.h"
+
#include <stdlib.h>
#include <string.h>