Arm Community
Site
Search
User
Site
Search
User
Groups
Arm Research
DesignStart
Education Hub
Graphics and Gaming
High Performance Computing
Innovation
Multimedia
Open Source Software and Platforms
Physical
Processors
Security
System
Software Tools
TrustZone for Armv8-M
中文社区
Blog
Announcements
Artificial Intelligence
Automotive
Healthcare
HPC
Infrastructure
Innovation
Internet of Things
Machine Learning
Mobile
Smart Homes
Wearables
Forums
All developer forums
IP Product forums
Tool & Software forums
Pelion IoT Platform
Support
Open a support case
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Developer Community
Tools and Software
Software Tools
Jump...
Cancel
Software Tools
Arm Compilers forum
Problem with rand_r() and strnlen()
Tools, Software and IDEs blog
Forums
Videos & Files
Help
Jump...
Cancel
New
State
Not Answered
Replies
2 replies
Subscribers
8 subscribers
Views
1636 views
Users
0 members are here
Related
Problem with rand_r() and strnlen()
Offline
skysurf99
9 months ago
Hello,
I am currently currently using the ARM 6.6.1 compiler and running into an issue while using the rand_r() and strnlen() functions in the code below,
static inline uint32_t MCM_RandR(uint32_t *const aSeed)
{
return
rand_r((unsigned int*)aSeed)
;
}
This results in the following error:
implicit declaration of function 'rand_r' is invalid in C99 [-Wimplicit-function-declaration]
return rand_r((unsigned int*)aSeed);
Similarly I am running into a similar issue with the strnlen function which gives the below error when compiling,
warning: implicit declaration of function 'strnlen' is invalid in C99 [-Wimplicit-function-declaration]
len = strnlen(logBuf, ULOG_STR_MAX_SIZE);
The above code and both function calls compile fine with the ARM 6.6.2 compiler version, however with the 6.6.1 version I am getting the above errors.
Are these functions not supported in the 6.6.1 compiler as they are in 6.6.2? Are there any compiler options or settings that might enable their support in 6.6.1?
Would appreciate any feedback and thank you in advance for your help.
More questions in this forum
By title
By date
By reply count
By view count
By most asked
By votes
By quality
Descending
Ascending
All recent questions
Unread questions
Questions you've participated in
Questions you've asked
Unanswered questions
Answered questions
Questions with suggested answers
Questions with no replies
Not Answered
Access a flash region like an array, without writing data to it during programing
0
257
views
0
replies
Started
2 months ago
by
Ravbk
Answered
Detection of warning depend on optimisation
0
1276
views
6
replies
Latest
2 months ago
by
fkl_at_deif
Suggested Answer
ARMcc CMake Toolchain availability
0
609
views
1
reply
Latest
2 months ago
by
Ronan Synnott
Suggested Answer
C library folder structure
0
IDEs and Tool Suites
Library
682
views
2
replies
Latest
2 months ago
by
Clonimus74
Not Answered
converting/ moving from Linux compiler to Keil
0
473
views
1
reply
Latest
2 months ago
by
Andy Neil
<
>
View all questions in Arm Compilers forum