diff options
author | Slávek Banko <[email protected]> | 2017-02-05 03:03:15 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2017-02-05 03:03:15 +0100 |
commit | 2b3ad7abc100654e0f9b0d6e6f1ebbf219b2ea9e (patch) | |
tree | 3b0050f0ca2d9c797742f24fda72ace753d5a9d4 | |
parent | 311fd504446f6ba994d4fe2c30d9871fd4de0f73 (diff) | |
download | knetworkmanager8-2b3ad7abc100654e0f9b0d6e6f1ebbf219b2ea9e.tar.gz knetworkmanager8-2b3ad7abc100654e0f9b0d6e6f1ebbf219b2ea9e.zip |
Fix detection whether the system is big endian
Signed-off-by: Slávek Banko <[email protected]>
-rw-r--r-- | ConfigureChecks.cmake | 5 | ||||
-rw-r--r-- | config.h.cmake | 4 | ||||
-rw-r--r-- | knetworkmanager-0.8/src/sha1.cpp | 2 |
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> |