Skip to content

Commit

Permalink
Pass c99 to compiler in CMakeLists.txt
Browse files Browse the repository at this point in the history
Fixes Mbed-TLS#3631

Signed-off-by: okhowang(王沛文) <okhowang@tencent.com>
  • Loading branch information
okhowang committed Aug 2, 2021
1 parent 6981347 commit 4a6b639
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 3rdparty/everest/library/Hacl_Curve25519_joined.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
#ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
#ifndef _DEFAULT_SOURCE
#define _DEFAULT_SOURCE
#endif

#include "common.h"

Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}")

include(CheckCCompilerFlag)

set(CMAKE_C_STANDARD 99)

if(CMAKE_COMPILER_IS_GNU)
# some warnings we want are not available with old GCC versions
# note: starting with CMake 2.8 we could use CMAKE_C_COMPILER_VERSION
Expand Down
3 changes: 3 additions & 0 deletions ChangeLog.d/c99.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Changes
* Pass standard c99 to compiler in CMakeLists.txt

0 comments on commit 4a6b639

Please sign in to comment.