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
Support gold linker for gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf?
0
268
views
0
replies
Started
1 month ago
by
MZK
Not Answered
How to place a 'function' using scatter file.
0
2626
views
5
replies
Latest
1 month ago
by
swapnil maskar
Suggested Answer
I have to place one function at specific address using scatter file please give me any idea.
0
1990
views
12
replies
Latest
1 month ago
by
Ronan Synnott
Answered
Clang static analyzer produces linker error L6007U
0
Keil MDK
Arm Compiler 6
1452
views
2
replies
Latest
1 month ago
by
MitraSurik
Answered
Is the optimizer qualified in the compiler version AC 6.6.x for functional safety?
+1
Arm Compiler 6
optimization
Functional Saftey
1042
views
2
replies
Latest
2 months ago
by
MuRa
<
>
View all questions in Arm Compilers forum