--- libasignify/sha2.h.orig	2015-06-13 11:00:00.647603180 +0200
+++ libasignify/sha2.h	2015-06-13 11:00:43.070069529 +0200
@@ -59,7 +59,11 @@ typedef struct _SHA2_CTX {
 	uint8_t	buffer[SHA512_BLOCK_LENGTH];
 } SHA2_CTX;
 
-__BEGIN_DECLS
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void SHA256Init(SHA2_CTX *);
 void SHA256Transform(uint32_t state[8], const uint8_t [SHA256_BLOCK_LENGTH]);
 void SHA256Update(SHA2_CTX *, const uint8_t *, size_t);
@@ -79,6 +83,9 @@ char *SHA512End(SHA2_CTX *, char *);
 char *SHA512File(const char *, char *);
 char *SHA512FileChunk(const char *, char *, off_t, off_t);
 char *SHA512Data(const uint8_t *, size_t, char *);
-__END_DECLS
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* _SHA2_H */
