[ENDIAN] Build md5 code correctly for bigendian targets

Signed-off-by: Raghu Gandham <raghu@mips.com>
diff --git a/libc/bionic/md5.c b/libc/bionic/md5.c
index 087786f..16674f1 100644
--- a/libc/bionic/md5.c
+++ b/libc/bionic/md5.c
@@ -38,6 +38,7 @@
         "$NetBSD: md5.c,v 1.1.1.4 2002/09/12 12:41:42 joda Exp $");
 #endif
 
+#include <endian.h>
 #include "md5.h"
 #include "hash.h"
 
@@ -178,8 +179,11 @@
 /*
  * From `Performance analysis of MD5' by Joseph D. Touch <touch@isi.edu>
  */
+#if !defined(__BYTE_ORDER) || !defined (__BIG_ENDIAN)
+#error __BYTE_ORDER macros not defined
+#endif
 
-#if defined(WORDS_BIGENDIAN)
+#if __BYTE_ORDER == __BIG_ENDIAN
 static inline u_int32_t
 swap_u_int32_t (u_int32_t t)
 {
@@ -217,7 +221,7 @@
     p += l;
     len -= l;
     if(offset == 64){
-#if defined(WORDS_BIGENDIAN)
+#if __BYTE_ORDER == __BIG_ENDIAN
       int i;
       u_int32_t current[16];
       struct x32 *u = (struct x32*)m->save;