From 366006fba34d9b164932c0775bdbaa0ac90617f5 Mon Sep 17 00:00:00 2001 From: Gua Guo Date: Mon, 13 Mar 2023 10:41:52 +0800 Subject: Remove CRT dependency and add clang compiler compatible Currently, we encounter enable MIPI sys-t into UEFI environment. CRT related library will cause the build failure, remove stdlib.h dependency, and add removing _WIN32 when compiler is clang --- library/include/mipi_syst/compiler.h | 4 ++++ library/src/mipi_syst_init.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/library/include/mipi_syst/compiler.h b/library/include/mipi_syst/compiler.h index 822642e..b73512c 100644 --- a/library/include/mipi_syst/compiler.h +++ b/library/include/mipi_syst/compiler.h @@ -45,6 +45,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. extern "C" { #endif +#if defined(__clang__) +#undef _WIN32 +#endif + #if defined(_WIN32) /* MSVC Compiler section */ /* basic integer types diff --git a/library/src/mipi_syst_init.c b/library/src/mipi_syst_init.c index 9c213a6..59d2c45 100644 --- a/library/src/mipi_syst_init.c +++ b/library/src/mipi_syst_init.c @@ -36,7 +36,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * Norbert Schulz (Intel Corporation) - Initial API and implementation */ -#include #include "mipi_syst.h" #include "mipi_syst/message.h" -- cgit v1.1