Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdio.h Header file adjustment related #2852

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --color -ur cmocka_bak/src/cmocka.c cmocka/src/cmocka.c
--- cmocka_bak/src/cmocka.c 2024-11-14 15:50:02.013648944 +0800
+++ cmocka/src/cmocka.c 2024-11-14 15:50:23.136212001 +0800
@@ -48,6 +48,7 @@
#include <regex.h>
#include <mqueue.h>
#include <fcntl.h>
+#include <unistd.h>

/*
* This allows to add a platform specific header file. Some embedded platforms
2 changes: 2 additions & 0 deletions testing/cmocka/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ if(CONFIG_TESTING_CMOCKA)
${CMAKE_CURRENT_LIST_DIR}/0005-cmocka-cmocka_private-fix-warning-in-cmocka_private.patch
&& patch -p0 -d ${CMAKE_CURRENT_LIST_DIR}/cmocka <
${CMAKE_CURRENT_LIST_DIR}/0006-fix-linux-risc-v-compile-error-list_initialize.patch
&& patch -p0 -d ${CMAKE_CURRENT_LIST_DIR}/cmocka <
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i test in linux, ftruncate is need include <unistd.h>. ftruncate is not use in cmocka mainline

Copy link
Contributor

Choose a reason for hiding this comment

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

let's update to cmocka new version instead

${CMAKE_CURRENT_LIST_DIR}/0007-remove-nuttx-xxx.h-in-stdio-need-add-depend-header-f.patch
DOWNLOAD_NO_PROGRESS true
TIMEOUT 30)

Expand Down
1 change: 1 addition & 0 deletions testing/cmocka/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ cmocka.zip:
$(Q) patch -p0 < 0004-cmocka-xml-report.patch
$(Q) patch -p0 < 0005-cmocka-cmocka_private-fix-warning-in-cmocka_private.patch
$(Q) patch -p0 < 0006-fix-linux-risc-v-compile-error-list_initialize.patch
$(Q) patch -p0 < 0007-remove-nuttx-xxx.h-in-stdio-need-add-depend-header-f.patch

context:: cmocka.zip

Expand Down
Loading