Noticed while building gcm128test.c and getting redefinition warnings.
---
 src/crypto/modes/modes.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/crypto/modes/modes.h b/src/crypto/modes/modes.h
index f18215b..3053277 100644
--- a/src/crypto/modes/modes.h
+++ b/src/crypto/modes/modes.h
@@ -5,8 +5,15 @@
  * forms are granted according to the OpenSSL license.
  */
 
+#ifndef HEADER_MODES_H
+#define HEADER_MODES_H
+
 #include <stddef.h>
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 typedef void (*block128_f)(const unsigned char in[16],
                        unsigned char out[16],
                        const void *key);
@@ -133,3 +140,9 @@ typedef struct xts128_context XTS128_CONTEXT;
 
 int CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx, const unsigned char 
iv[16],
        const unsigned char *inp, unsigned char *out, size_t len, int enc);
+
+#ifdef  __cplusplus
+}
+#endif
+
+#endif
-- 
1.9.3

Reply via email to