Skip to content

Commit

Permalink
Change order of headers in cpp_dummy_build.cpp
Browse files Browse the repository at this point in the history
check_config.h needs to be included directly after the configuration file,
because some headers are naughty and adapt the defined configurations, which can
cause check_comfig.h to break. (Specically bignum.h sets the configured
platform to MBEDTLS_HAVE_INT32/64 if it hasn't been defined).

That arguably is a bug, although it's the existing behaviour of the library,
so we respect it and move check_config.h to where it wants to be.

Signed-off-by: Simon Butcher <simon.butcher@arm.com>
  • Loading branch information
simonbutcher committed May 12, 2020
1 parent 009a375 commit c01507e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion programs/test/cpp_dummy_build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include "mbedtls/check_config.h"

#include "mbedtls/aes.h"
#include "mbedtls/aesni.h"
Expand All @@ -41,7 +42,6 @@
#include "mbedtls/certs.h"
#include "mbedtls/chacha20.h"
#include "mbedtls/chachapoly.h"
#include "mbedtls/check_config.h"
#include "mbedtls/cipher.h"
#include "mbedtls/cipher_internal.h"
#include "mbedtls/cmac.h"
Expand Down

0 comments on commit c01507e

Please sign in to comment.