Moved __cplusplus extern statement to include struct definitions as well.
diff --git a/include/polarssl/cipher.h b/include/polarssl/cipher.h
index 2ffdf66..8aa8cb0 100644
--- a/include/polarssl/cipher.h
+++ b/include/polarssl/cipher.h
@@ -46,6 +46,10 @@
 #define POLARSSL_ERR_CIPHER_INVALID_PADDING                -0x6200  /**< Input data contains invalid padding and is rejected. */
 #define POLARSSL_ERR_CIPHER_FULL_BLOCK_EXPECTED            -0x6280  /**< Decryption of block requires a full block. */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef enum {
     POLARSSL_CIPHER_ID_NONE = 0,
     POLARSSL_CIPHER_ID_NULL,
@@ -207,10 +211,6 @@
     void *cipher_ctx;
 } cipher_context_t;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * \brief Returns the list of ciphers supported by the generic cipher module.
  *