Moved __cplusplus extern statement to include struct definitions as well.
diff --git a/include/polarssl/md2.h b/include/polarssl/md2.h
index 1dc77c2..a8e23d0 100644
--- a/include/polarssl/md2.h
+++ b/include/polarssl/md2.h
@@ -37,6 +37,10 @@
 // Regular implementation
 //
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * \brief          MD2 context structure
  */
@@ -52,10 +56,6 @@
 }
 md2_context;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * \brief          MD2 context setup
  *