diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c40ab9e1a841fce74bef58ef4f78fd369b7ee55..46780af7309c2609a088f6a6bd0fcb9f533b94f0 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required( VERSION 3.8 ) include(CheckCXXCompilerFlag) project(CMINUSF) +add_compile_definitions(_POSIX_C_SOURCE=200112L) set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -std=c99") diff --git a/include/lightir/Type.hpp b/include/lightir/Type.hpp index c0041e6c695a2aa4eafe8e455c0eaa7617e00f41..791577652b40a493a8466bfa0696ee8898e650bd 100755 --- a/include/lightir/Type.hpp +++ b/include/lightir/Type.hpp @@ -2,6 +2,7 @@ #include #include +#include class Module; class IntegerType; diff --git a/src/common/util.cpp b/src/common/util.cpp index 4af9cecb71240e41d2dd364105547a95ca92575a..83cec45a80d7c8815eb6f47bb1f0f413401ba188 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -1,4 +1,5 @@ #include "util.hpp" +#include std::string ptr_to_str(const void* ptr) {