Moved __cplusplus extern statement to include struct definitions as well.
diff --git a/include/polarssl/sha1.h b/include/polarssl/sha1.h
index 81ea77d..1c18f8a 100644
--- a/include/polarssl/sha1.h
+++ b/include/polarssl/sha1.h
@@ -44,6 +44,10 @@
 // Regular implementation
 //
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * \brief          SHA-1 context structure
  */
@@ -58,10 +62,6 @@
 }
 sha1_context;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * \brief          SHA-1 context setup
  *