From 2b3ad7abc100654e0f9b0d6e6f1ebbf219b2ea9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 5 Feb 2017 03:03:15 +0100 Subject: [PATCH] Fix detection whether the system is big endian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- ConfigureChecks.cmake | 5 +++++ config.h.cmake | 4 ++++ knetworkmanager-0.8/src/sha1.cpp | 2 ++ 3 files changed, 11 insertions(+) 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 #include