From 1dd94bb0cb95e1a16d3c7197be29b0cb886c6108 Mon Sep 17 00:00:00 2001 From: David Garske Date: Wed, 31 Jul 2024 08:40:16 -0700 Subject: [PATCH] Fix for .c files to ensure macro guards for wildcard. --- wolfcrypt/src/port/autosar/cryif.c | 6 ++++-- wolfcrypt/src/port/autosar/crypto.c | 4 ++-- wolfcrypt/src/port/autosar/csm.c | 7 ++++--- wolfcrypt/src/port/autosar/test.c | 5 +++++ 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/wolfcrypt/src/port/autosar/cryif.c b/wolfcrypt/src/port/autosar/cryif.c index 0bd767b4b..6fd9cc1a2 100644 --- a/wolfcrypt/src/port/autosar/cryif.c +++ b/wolfcrypt/src/port/autosar/cryif.c @@ -28,13 +28,15 @@ #endif #include + +#ifdef WOLFSSL_AUTOSAR +#ifndef NO_WOLFSSL_AUTOSAR_CRYIF + #include #include #include #include -#ifdef WOLFSSL_AUTOSAR -#ifndef NO_WOLFSSL_AUTOSAR_CRYIF #include diff --git a/wolfcrypt/src/port/autosar/crypto.c b/wolfcrypt/src/port/autosar/crypto.c index f7812f190..d5a7509f6 100644 --- a/wolfcrypt/src/port/autosar/crypto.c +++ b/wolfcrypt/src/port/autosar/crypto.c @@ -25,12 +25,12 @@ #endif #include -#include -#include #ifdef WOLFSSL_AUTOSAR #ifndef NO_WOLFSSL_AUTOSAR_CRYPTO +#include +#include #include #include #include diff --git a/wolfcrypt/src/port/autosar/csm.c b/wolfcrypt/src/port/autosar/csm.c index f5df124b9..8fa6063a7 100644 --- a/wolfcrypt/src/port/autosar/csm.c +++ b/wolfcrypt/src/port/autosar/csm.c @@ -25,14 +25,15 @@ #endif #include + +#ifdef WOLFSSL_AUTOSAR +#ifndef NO_WOLFSSL_AUTOSAR_CSM + #include #include #include #include -#ifdef WOLFSSL_AUTOSAR -#ifndef NO_WOLFSSL_AUTOSAR_CSM - /* AutoSAR 4.4 */ /* basic shim layer to plug in wolfSSL crypto */ diff --git a/wolfcrypt/src/port/autosar/test.c b/wolfcrypt/src/port/autosar/test.c index 4c311f189..29cd8fc3e 100644 --- a/wolfcrypt/src/port/autosar/test.c +++ b/wolfcrypt/src/port/autosar/test.c @@ -24,6 +24,9 @@ #endif #include + +#ifdef WOLFSSL_AUTOSAR + #include #include #define BLOCK_SIZE 16 @@ -428,3 +431,5 @@ int main(int argc, char* argv[]) #endif /* REDIRECTION_CONFIG */ return ret; } + +#endif /* WOLFSSL_AUTOSAR */