diff --git a/ChangeLog.txt b/ChangeLog.txt index 8c0411cb..ae784464 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,10 @@ +1.4.0 +===== + +[1] Fixed a build issue on OS X PowerPC platforms (md5cmp failed to build +because OS X does not provide the le32toh() and htole32() functions.) + + 1.3.90 (1.4 beta1) ================== diff --git a/md5/md5.c b/md5/md5.c index 7193e95b..b30df974 100644 --- a/md5/md5.c +++ b/md5/md5.c @@ -38,6 +38,15 @@ static void MD5Transform(unsigned int [4], const unsigned char [64]); #define Decode memcpy #else +/* + * OS X doesn't have le32toh() or htole32() + */ +#ifdef __APPLE__ +#include +#define le32toh(x) OSSwapLittleToHostInt32(x) +#define htole32(x) OSSwapHostToLittleInt32(x) +#endif + /* * Encodes input (unsigned int) into output (unsigned char). Assumes len is * a multiple of 4.