[PATCH 0/2] libgloss: Fix build warnings for RISC-V

Pincheng Wang <[email protected]> Mon, 1 Dec 2025 22:33:31 +0800
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Hi all,

This patch series addresses build warnings encountered when compiling
libgloss for RISC-V using gcc version 15.1.0 (g1b306039ac4) and
configure command './configure --target=riscv64-unknown
-elf --prefix=/opt/newlib-sysroot-rv64'.

Newer GCC versions are stricter regarding function declarations and type
definitions.

Patch 1 converts old-style K&R function definitions to ANSI C prototypes
in sbrk implementations.
Patch 2 adds missing includes to sys_utime.c to ensure 'struct utimbuf'
is properly defined.

I would appreciate any feedback and comments.

Thanks,
Pincheng Wang

Pincheng Wang (2):
  libgloss/riscv: Fix old style function declaration warnings
  libgloss/riscv: Fix struct utimbuf warning in sys_utime.c stub

 libgloss/libnosys/sbrk.c           | 3 +--
 libgloss/riscv/semihost-sys_sbrk.c | 3 +--
 libgloss/riscv/sys_sbrk.c          | 3 +--
 libgloss/riscv/sys_utime.c         | 2 ++
 4 files changed, 5 insertions(+), 6 deletions(-)

-- 
2.39.5