This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 1ac524e2bd53da91b34a785b08efb2571f49570c Author: zhaoxingyu1 <[email protected]> AuthorDate: Thu Nov 12 20:21:05 2026 +0800 fs: include nuttx/lib/lib.h where lib_tempbuffer is used lib_get_tempbuffer() and lib_put_tempbuffer() are declared in nuttx/lib/lib.h, which these files never included. Without a visible prototype the compiler falls back to an implicit declaration returning int, which is a hard error on GCC 14 and later and would truncate the returned pointer on targets whose addresses do not fit in 32 bits. Signed-off-by: zhaoxingyu1 <[email protected]> --- fs/inode/fs_foreachinode.c | 1 + fs/nxffs/nxffs_dump.c | 1 + fs/partition/fs_gpt.c | 1 + fs/partition/fs_mbr.c | 1 + fs/partition/fs_ptable.c | 1 + fs/partition/fs_txtable.c | 1 + fs/spiffs/src/spiffs_vfs.c | 1 + fs/vfs/fs_select.c | 1 + 8 files changed, 8 insertions(+) diff --git a/fs/inode/fs_foreachinode.c b/fs/inode/fs_foreachinode.c index fafa8f86d09..7e61177c081 100644 --- a/fs/inode/fs_foreachinode.c +++ b/fs/inode/fs_foreachinode.c @@ -33,6 +33,7 @@ #include <nuttx/kmalloc.h> #include <nuttx/fs/fs.h> +#include <nuttx/lib/lib.h> #include "inode/inode.h" diff --git a/fs/nxffs/nxffs_dump.c b/fs/nxffs/nxffs_dump.c index a4c1f0e329f..9d69a8a2de2 100644 --- a/fs/nxffs/nxffs_dump.c +++ b/fs/nxffs/nxffs_dump.c @@ -33,6 +33,7 @@ #include <nuttx/crc32.h> #include <nuttx/kmalloc.h> #include <nuttx/fs/ioctl.h> +#include <nuttx/lib/lib.h> #include <nuttx/mtd/mtd.h> #include "nxffs.h" diff --git a/fs/partition/fs_gpt.c b/fs/partition/fs_gpt.c index fc8dbe26a00..2be8d8e3d70 100644 --- a/fs/partition/fs_gpt.c +++ b/fs/partition/fs_gpt.c @@ -32,6 +32,7 @@ #include <nuttx/crc32.h> #include <nuttx/kmalloc.h> +#include <nuttx/lib/lib.h> #include "partition.h" #include "fs_heap.h" diff --git a/fs/partition/fs_mbr.c b/fs/partition/fs_mbr.c index 47de1083943..94beecb161f 100644 --- a/fs/partition/fs_mbr.c +++ b/fs/partition/fs_mbr.c @@ -30,6 +30,7 @@ #include <inttypes.h> #include <nuttx/kmalloc.h> +#include <nuttx/lib/lib.h> #include "partition.h" diff --git a/fs/partition/fs_ptable.c b/fs/partition/fs_ptable.c index da801e27b6b..73e7c758c83 100644 --- a/fs/partition/fs_ptable.c +++ b/fs/partition/fs_ptable.c @@ -27,6 +27,7 @@ #include <string.h> #include <nuttx/kmalloc.h> +#include <nuttx/lib/lib.h> #include "partition.h" diff --git a/fs/partition/fs_txtable.c b/fs/partition/fs_txtable.c index a507c88f59b..09984185285 100644 --- a/fs/partition/fs_txtable.c +++ b/fs/partition/fs_txtable.c @@ -31,6 +31,7 @@ #include <nuttx/fs/fs.h> #include <nuttx/kmalloc.h> +#include <nuttx/lib/lib.h> #include <nuttx/macro.h> #include "partition.h" diff --git a/fs/spiffs/src/spiffs_vfs.c b/fs/spiffs/src/spiffs_vfs.c index 2c3c3df3698..6059bc2e8e9 100644 --- a/fs/spiffs/src/spiffs_vfs.c +++ b/fs/spiffs/src/spiffs_vfs.c @@ -58,6 +58,7 @@ #include <nuttx/queue.h> #include <nuttx/fs/fs.h> #include <nuttx/fs/ioctl.h> +#include <nuttx/lib/lib.h> #include "fs_heap.h" #include "spiffs.h" diff --git a/fs/vfs/fs_select.c b/fs/vfs/fs_select.c index 7d31c6cb9ce..077c5b0c620 100644 --- a/fs/vfs/fs_select.c +++ b/fs/vfs/fs_select.c @@ -40,6 +40,7 @@ #include <nuttx/kmalloc.h> #include <nuttx/cancelpt.h> #include <nuttx/fs/fs.h> +#include <nuttx/lib/lib.h> #include "inode/inode.h"
