Moved __cplusplus extern statement to include struct definitions as well.
diff --git a/include/polarssl/sha4.h b/include/polarssl/sha4.h
index e2ff3cc..450ef59 100644
--- a/include/polarssl/sha4.h
+++ b/include/polarssl/sha4.h
@@ -45,6 +45,10 @@
 // Regular implementation
 //
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * \brief          SHA-512 context structure
  */
@@ -60,10 +64,6 @@
 }
 sha4_context;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * \brief          SHA-512 context setup
  *