From 309a18a03adab1eaca5d86654dd4e1075ee49e7a Mon Sep 17 00:00:00 2001 From: Kody Stribrny <89810515+kstribrnAmzn@users.noreply.github.com> Date: Mon, 6 Mar 2023 20:04:15 -0800 Subject: [PATCH] Fix freertos_kernel cmake property, Posix Port (#640) * Fix freertos_kernel cmake property, Posix Port * Moves the `set_property()` call below the target definition in top level CMakeLists file * Corrects billion value from `ULL` suffix (not C90 compliant) to `UL` suffix with cast to uint64_t * Add blank line to CMakeLists.txt --- CMakeLists.txt | 8 ++++---- portable/ThirdParty/GCC/Posix/port.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b51b7aaac..6d83db88b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,10 +228,6 @@ elseif((FREERTOS_PORT STREQUAL "A_CUSTOM_PORT") AND (NOT TARGET freertos_kernel_ " freertos_kernel)") endif() -######################################################################## -# Requirements -set_property(TARGET freertos_kernel PROPERTY C_STANDARD 90) - ######################################################################## # Overall Compile Options # Note the compile option strategy is to error on everything and then @@ -294,3 +290,7 @@ target_link_libraries(freertos_kernel $<$:freertos_config> freertos_kernel_port ) + +######################################################################## +# Requirements +set_property(TARGET freertos_kernel PROPERTY C_STANDARD 90) diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index 12076b989..d634c8b26 100644 --- a/portable/ThirdParty/GCC/Posix/port.c +++ b/portable/ThirdParty/GCC/Posix/port.c @@ -343,7 +343,7 @@ static uint64_t prvGetTimeNs( void ) clock_gettime( CLOCK_MONOTONIC, &t ); - return ( uint64_t )t.tv_sec * 1000000000ULL + ( uint64_t )t.tv_nsec; + return ( uint64_t )t.tv_sec * ( uint64_t )1000000000UL + ( uint64_t )t.tv_nsec; } static uint64_t prvStartTimeNs;