Skip to content

Commit

Permalink
Fix IAR compilation error with NUCLEO_F401RE (#86)
Browse files Browse the repository at this point in the history
Include mbedtls config files before including ssl.h to avoid
error: "mbedtls\ssl.h",384 Error[Pe169]: expected a declaration"
  • Loading branch information
Arto Kinnunen committed Dec 12, 2017
1 parent 674a465 commit d0a2597
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions source/include/coap_security_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,18 @@
#include "ns_types.h"

#ifdef NS_USE_EXTERNAL_MBED_TLS
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif

#if defined(MBEDTLS_SSL_TLS_C)
#include "mbedtls/ssl.h"
#ifdef MBEDTLS_SSL_TLS_C
#define COAP_SECURITY_AVAILABLE
#endif
#endif

#endif /* NS_USE_EXTERNAL_MBED_TLS */

#define COOKIE_SIMPLE_LEN 8
typedef struct simple_cookie {
Expand Down

0 comments on commit d0a2597

Please sign in to comment.