Enable big-endian build

BUG=25017606

Change-Id: I8edea03a8d07a990db0cd4d77e60bc61fba6ce97
Reviewed-on: https://weave-review.googlesource.com/1632
Reviewed-by: Vitaly Buka <vitalybuka@google.com>
diff --git a/third_party/modp_b64/modp_b64.cc b/third_party/modp_b64/modp_b64.cc
index fdb8a40..8db2ed1 100644
--- a/third_party/modp_b64/modp_b64.cc
+++ b/third_party/modp_b64/modp_b64.cc
@@ -45,16 +45,12 @@
 /* public header */
 #include "modp_b64.h"
 
-/*
- * If you are ripping this out of the library, comment out the next
- * line and uncomment the next lines as approrpiate
- */
-//#include "config.h"
+#include <base/build/build_config.h>
 
-/* if on motoral, sun, ibm; uncomment this */
-/* #define WORDS_BIGENDIAN 1 */
-/* else for Intel, Amd; uncomment this */
-/* #undef WORDS_BIGENDIAN */
+#undef WORDS_BIGENDIAN
+#if !defined(ARCH_CPU_LITTLE_ENDIAN)
+#define WORDS_BIGENDIAN 1
+#endif
 
 #include "modp_b64_data.h"
 
@@ -118,7 +114,7 @@
 }
 
 #ifdef WORDS_BIGENDIAN   /* BIG ENDIAN -- SUN / IBM / MOTOROLA */
-int modp_b64_decode(char* dest, const char* src, int len)
+size_t modp_b64_decode(char* dest, const char* src, size_t len)
 {
     if (len == 0) return 0;