Skip to content

examples/optee_gp: Include stdlib.h and string.h. - #3845

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
casaroli:optee-gp-stdlib
Oct 14, 2026
Merged

xiaoxiang781216 merged 1 commit into
apache:masterfrom
casaroli:optee-gp-stdlib

Conversation

@casaroli

@casaroli casaroli commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

depends-on: apache/nuttx/pull/20661

Summary

imx93-evk:optee does not compile on master: optee_gp_main.c:115: error: implicit declaration of function 'malloc'.

optee_gp_main.c calls malloc(), free(), memset() and memcmp(), but got their declarations only indirectly. Since apache/nuttx#20565, stdio.h does not include nuttx/lib/lib.h. This PR includes stdlib.h and string.h directly.

Impact

Build fix only. This config fails the Linux (arm64-01) CI job of every nuttx PR.

Testing

imx93-evk:optee builds on master with this PR. tools/checkpatch.sh -f passes.

Comment thread examples/optee_gp/optee_gp_main.c
optee_gp_main.c calls malloc(), free(), memset() and memcmp(), but got
their declarations only indirectly.  nuttx/lib/lib.h is no longer
included by stdio.h, so imx93-evk:optee does not compile.  Include the
headers directly.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>

@cederom cederom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @casaroli :-)

@xiaoxiang781216
xiaoxiang781216 merged commit 5a66813 into apache:master Oct 14, 2026
23 of 40 checks passed
@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx-apps/actions/runs/38565544036

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants