From af26f99991e569b39baacefcf05a533e4b8b1dde Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Wed, 3 Jan 2024 17:33:38 +0800 Subject: [PATCH] fix build failed. --- 3party/mongoose/mongoose.c | 5 +++++ CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/3party/mongoose/mongoose.c b/3party/mongoose/mongoose.c index b892772..e20e407 100644 --- a/3party/mongoose/mongoose.c +++ b/3party/mongoose/mongoose.c @@ -17,7 +17,12 @@ // // SPDX-License-Identifier: GPL-2.0-only or commercial +// fix miss CLOCK_REALTIME +#define _POSIX_C_SOURCE 200809L #include "mongoose.h" +#include +#include +#include #ifdef MG_ENABLE_LINES #line 1 "src/base64.c" diff --git a/CMakeLists.txt b/CMakeLists.txt index 85cd638..ef4f835 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(ulib LANGUAGES CXX C VERSION 0.1.0) -set(CMAKE_C_STANDARD 99) +set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD 11)