Skip to content

Commit 309a18a

Browse files
authored
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
1 parent 7b26ea6 commit 309a18a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,6 @@ elseif((FREERTOS_PORT STREQUAL "A_CUSTOM_PORT") AND (NOT TARGET freertos_kernel_
228228
" freertos_kernel)")
229229
endif()
230230

231-
########################################################################
232-
# Requirements
233-
set_property(TARGET freertos_kernel PROPERTY C_STANDARD 90)
234-
235231
########################################################################
236232
# Overall Compile Options
237233
# Note the compile option strategy is to error on everything and then
@@ -294,3 +290,7 @@ target_link_libraries(freertos_kernel
294290
$<$<TARGET_EXISTS:freertos_config>:freertos_config>
295291
freertos_kernel_port
296292
)
293+
294+
########################################################################
295+
# Requirements
296+
set_property(TARGET freertos_kernel PROPERTY C_STANDARD 90)

portable/ThirdParty/GCC/Posix/port.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ static uint64_t prvGetTimeNs( void )
343343

344344
clock_gettime( CLOCK_MONOTONIC, &t );
345345

346-
return ( uint64_t )t.tv_sec * 1000000000ULL + ( uint64_t )t.tv_nsec;
346+
return ( uint64_t )t.tv_sec * ( uint64_t )1000000000UL + ( uint64_t )t.tv_nsec;
347347
}
348348

349349
static uint64_t prvStartTimeNs;

0 commit comments

Comments
 (0)