Skip to content

Instantly share code, notes, and snippets.

Created January 6, 2013 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4466305 to your computer and use it in GitHub Desktop.
Save anonymous/4466305 to your computer and use it in GitHub Desktop.
fix for osx 10.7 sha1_init/update/final deprecated build error
diff --git a/src/fmq_hash.c b/src/fmq_hash.c
index 10c394d..4887f6f 100644
--- a/src/fmq_hash.c
+++ b/src/fmq_hash.c
@@ -23,7 +23,13 @@
*/
#include <czmq.h>
-#include <openssl/sha.h>
+#if defined(__APPLE__)
+# define COMMON_DIGEST_FOR_OPENSSL
+# include <CommonCrypto/CommonDigest.h>
+# define SHA1 CC_SHA1
+#else
+# include <openssl/sha.h>
+#endif
#include "../include/fmq.h"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment