Moved __cplusplus extern statement to include struct definitions as well.
diff --git a/include/polarssl/ecdh.h b/include/polarssl/ecdh.h
index 7f6f4cb..2184ab9 100644
--- a/include/polarssl/ecdh.h
+++ b/include/polarssl/ecdh.h
@@ -29,6 +29,10 @@
 
 #include "polarssl/ecp.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * \brief           ECDH context structure
  */
@@ -43,10 +47,6 @@
 }
 ecdh_context;
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  * \brief           Generate a public key
  *