Moved __cplusplus extern statement to include struct definitions as well.
diff --git a/include/polarssl/md5.h b/include/polarssl/md5.h
index c90789d..87474a7 100644
--- a/include/polarssl/md5.h
+++ b/include/polarssl/md5.h
@@ -44,6 +44,10 @@
 // Regular implementation
 //
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * \brief          MD5 context structure
  */
@@ -58,10 +62,6 @@
 }
 md5_context;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * \brief          MD5 context setup
  *