aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGua Guo <gua.guo@intel.com>2023-03-13 10:41:52 +0800
committerGua Guo <gua.guo@intel.com>2023-03-13 10:41:52 +0800
commit366006fba34d9b164932c0775bdbaa0ac90617f5 (patch)
tree52cd06eb04ec483fc065dfa038cbcde1c00fb626
parent9e987325e061bfd0e8bd3add2cb693a5ca4a39ad (diff)
downloadmipisyst-366006fba34d9b164932c0775bdbaa0ac90617f5.zip
mipisyst-366006fba34d9b164932c0775bdbaa0ac90617f5.tar.gz
mipisyst-366006fba34d9b164932c0775bdbaa0ac90617f5.tar.bz2
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
-rw-r--r--library/include/mipi_syst/compiler.h4
-rw-r--r--library/src/mipi_syst_init.c1
2 files changed, 4 insertions, 1 deletions
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 <stdlib.h>
#include "mipi_syst.h"
#include "mipi_syst/message.h"