300-fix-compile-with-cyassl.patch 564 B

12345678910111213141516171819202122232425262728
  1. --- a/src/md5.h
  2. +++ b/src/md5.h
  3. @@ -28,6 +28,14 @@
  4. #define MD5Update MD5_Update
  5. #define MD5Final MD5_Final
  6. +#elif HAVE_CYASSL
  7. +#include <cyassl/openssl/md5.h>
  8. +
  9. +#define MD5Init MD5_Init
  10. +#define MD5Update MD5_Update
  11. +#define MD5Final MD5_Final
  12. +
  13. +typedef struct CYASSL_MD5_CTX MD5_CTX;
  14. #else
  15. struct MD5Context {
  16. --- a/src/md5.c
  17. +++ b/src/md5.c
  18. @@ -18,7 +18,7 @@
  19. #include <string.h> /* for memcpy() */
  20. #include "md5.h"
  21. -#ifndef HAVE_OPENSSL
  22. +#if !defined(HAVE_OPENSSL) && !defined(HAVE_CYASSL)
  23. void byteReverse(unsigned char *buf, size_t longs);