mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-10-23 04:58:16 +08:00
wrap mbedtls includes to avoid build warnings
This commit is contained in:
parent
3bc609c9a3
commit
eb78b5bf0b
@ -5,12 +5,7 @@
|
||||
#define AUTH_INCLUDE_H
|
||||
|
||||
#include "base.h"
|
||||
#include "mbedtls/pk.h"
|
||||
#include "mbedtls/x509.h"
|
||||
#include "mbedtls/error.h"
|
||||
#include "mbedtls/sha1.h"
|
||||
#include "mbedtls/entropy.h"
|
||||
#include "mbedtls/ctr_drbg.h"
|
||||
#include "include.wrap.mbedtls.h"
|
||||
|
||||
|
||||
// the data type is important, we depend on sizeof() for each one of them
|
||||
|
27
dll/dll/include.wrap.mbedtls.h
Normal file
27
dll/dll/include.wrap.mbedtls.h
Normal file
@ -0,0 +1,27 @@
|
||||
#if defined(__linux__) || defined(linux) || defined(GNUC) || defined(__MINGW32__) || defined(__MINGW64__)
|
||||
// https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html
|
||||
// https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wall
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wall"
|
||||
|
||||
#include "mbedtls/pk.h"
|
||||
#include "mbedtls/x509.h"
|
||||
#include "mbedtls/error.h"
|
||||
#include "mbedtls/sha1.h"
|
||||
#include "mbedtls/entropy.h"
|
||||
#include "mbedtls/ctr_drbg.h"
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
#else
|
||||
// https://learn.microsoft.com/en-us/cpp/preprocessor/warning?view=msvc-170#push-and-pop
|
||||
#pragma warning(push, 0)
|
||||
|
||||
#include "mbedtls/pk.h"
|
||||
#include "mbedtls/x509.h"
|
||||
#include "mbedtls/error.h"
|
||||
#include "mbedtls/sha1.h"
|
||||
#include "mbedtls/entropy.h"
|
||||
#include "mbedtls/ctr_drbg.h"
|
||||
|
||||
#pragma warning(pop)
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user