Moved __cplusplus extern statement to include struct definitions as well.
diff --git a/include/polarssl/pkcs11.h b/include/polarssl/pkcs11.h
index 003d3f5..270eb6d 100644
--- a/include/polarssl/pkcs11.h
+++ b/include/polarssl/pkcs11.h
@@ -5,7 +5,7 @@
  *
  * \author Adriaan de Jong <dejong@fox-it.com>
  *
- *  Copyright (C) 2006-2011, Brainspark B.V.
+ *  Copyright (C) 2006-2013, Brainspark B.V.
  *
  *  This file is part of PolarSSL (http://www.polarssl.org)
  *  Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@@ -45,6 +45,10 @@
 #endif /* __ARMCC_VERSION */
 #endif /*_MSC_VER */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Context for PKCS #11 private keys.
  */
@@ -156,6 +160,10 @@
     return ( (pkcs11_context *) ctx )->len;
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* POLARSSL_PKCS11_C */
 
 #endif /* POLARSSL_PKCS11_H */