Moved __cplusplus extern statement to include struct definitions as well.
diff --git a/include/polarssl/md.h b/include/polarssl/md.h
index d9ab5e7..f7b8bd3 100644
--- a/include/polarssl/md.h
+++ b/include/polarssl/md.h
@@ -5,7 +5,7 @@
*
* \author Adriaan de Jong <dejong@fox-it.com>
*
- * Copyright (C) 2006-2011, Brainspark B.V.
+ * Copyright (C) 2006-2013, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@@ -44,6 +44,10 @@
#define POLARSSL_ERR_MD_ALLOC_FAILED -0x5180 /**< Failed to allocate memory. */
#define POLARSSL_ERR_MD_FILE_IO_ERROR -0x5200 /**< Opening or reading of file failed. */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum {
POLARSSL_MD_NONE=0,
POLARSSL_MD_MD2,
@@ -131,10 +135,6 @@
NULL, /* md_ctx */ \
}
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/**
* \brief Returns the list of digests supported by the generic digest module.
*