[sr-dev] git:master:72eed465: core: use in tree portable endianness macros

Spencer Thomason spencer at whiteskycommunications.com
Wed Aug 10 09:07:52 CEST 2016


Module: kamailio
Branch: master
Commit: 72eed465dd142619e643fd8cbf7e42c73753fa12
URL: https://github.com/kamailio/kamailio/commit/72eed465dd142619e643fd8cbf7e42c73753fa12

Author: Spencer Thomason <spencer at whiteskycommunications.com>
Committer: Spencer Thomason <spencer at whiteskycommunications.com>
Date: 2016-08-09T15:18:59-07:00

core: use in tree portable endianness macros

- replace WORDS_BIGENDIAN with __IS_BIG_ENDIAN
- not all platforms define WORDS_BIGENDIAN on big endian archs
- closes GH #739

---

Modified: md5.c

---

Diff:  https://github.com/kamailio/kamailio/commit/72eed465dd142619e643fd8cbf7e42c73753fa12.diff
Patch: https://github.com/kamailio/kamailio/commit/72eed465dd142619e643fd8cbf7e42c73753fa12.patch

---

diff --git a/md5.c b/md5.c
index d675dd1..fdb166a 100644
--- a/md5.c
+++ b/md5.c
@@ -20,6 +20,7 @@
 #include <sys/types.h>
 #include <string.h>
 
+#include "endianness.h"
 #include "md5.h"
 
 #ifndef __OS_solaris
@@ -159,7 +160,7 @@ MD5Transform(u_int32_t state[4], const u_int8_t block[MD5_BLOCK_LENGTH])
 {
 	u_int32_t a, b, c, d, in[MD5_BLOCK_LENGTH / 4];
 
-#ifndef WORDS_BIGENDIAN
+#ifndef __IS_BIG_ENDIAN
 	memcpy(in, block, sizeof(in));
 #else
 	for (a = 0; a < MD5_BLOCK_LENGTH / 4; a++) {




More information about the sr-dev mailing list