Fix compilation with picolibc#1
Open
maribu wants to merge 1 commit into
Open
Conversation
According to the [stat man page][1] an `#include <sys/stat.h>` is needed
for access to the `stat()` function and the `struct stat` type. And
indeed, adding this fixes the following compilation error when building
with picolibc:
./include/xipfs.h:424:69: error: 'struct stat' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
424 | xipfs_fstat(xipfs_mount_t *mp, xipfs_file_desc_t *descp, struct stat *buf);
|
[1]: https://linux.die.net/man/2/stat
Author
|
This can be tested with RIOT in the current Applying the following patch (to make use of the change in this PR) fixes the compilation issue: diff --git a/pkg/xipfs/Makefile b/pkg/xipfs/Makefile
index ce59cdc807..a505d4a1ee 100644
--- a/pkg/xipfs/Makefile
+++ b/pkg/xipfs/Makefile
@@ -1,6 +1,6 @@
PKG_NAME=xipfs
PKG_URL=https://github.com/2xs/xipfs.git
-PKG_VERSION=75536def8c040074f5ae43a89dbb30893fd92618
+PKG_VERSION=f127bf88f034c4ef37a39a6f7e75b8b2d07d58cb
PKG_LICENSE=CeCILL-2.1
include $(RIOTBASE)/pkg/pkg.mk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
According to the stat man page an
#include <sys/stat.h>is needed for access to thestat()function and thestruct stattype. And indeed, adding this fixes the following compilation error when building with picolibc: