Moved __cplusplus extern statement to include struct definitions as well.
diff --git a/include/polarssl/aes.h b/include/polarssl/aes.h
index 30fdf61..dfb9a0a 100644
--- a/include/polarssl/aes.h
+++ b/include/polarssl/aes.h
@@ -48,6 +48,10 @@
 // Regular implementation
 //
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * \brief          AES context structure
  */
@@ -59,10 +63,6 @@
 }
 aes_context;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * \brief          AES key schedule (encryption)
  *