From c0f661bec4d21e1655773dd998957fa545cf5ee5 Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Fri, 10 May 2024 15:50:11 +0200 Subject: [PATCH] Fixes for GCC compilation --- newlib/libc/include/sys/lock.h | 2 +- newlib/libc/include/sys/stat.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/newlib/libc/include/sys/lock.h b/newlib/libc/include/sys/lock.h index 528904957b..9ee9e28da4 100644 --- a/newlib/libc/include/sys/lock.h +++ b/newlib/libc/include/sys/lock.h @@ -41,7 +41,7 @@ typedef struct __lock * _LOCK_T; extern void __retarget_lock_init(_LOCK_T *lock); #define __lock_init(lock) __retarget_lock_init(&lock) extern void __retarget_lock_init_recursive(_LOCK_T *lock); -#define __lock_init_recursive(lock) __retarget_lock_init_recursive(&lock) +#define __lock_init_recursive(lock) __retarget_lock_init_recursive((_LOCK_T*)&lock) extern void __retarget_lock_close(_LOCK_T lock); #define __lock_close(lock) __retarget_lock_close(lock) extern void __retarget_lock_close_recursive(_LOCK_T lock); diff --git a/newlib/libc/include/sys/stat.h b/newlib/libc/include/sys/stat.h index 98f5addb43..25a3804e36 100644 --- a/newlib/libc/include/sys/stat.h +++ b/newlib/libc/include/sys/stat.h @@ -142,7 +142,7 @@ int mkfifo (const char *__path, mode_t __mode ); int stat (const char *__restrict __path, struct stat *__restrict __sbuf ); mode_t umask (mode_t __mask ); -#if defined (__SPU__) || defined(__rtems__) || defined(__CYGWIN__) +#if defined (__SPU__) || defined(__rtems__) || defined(__CYGWIN__) || defined(__psp__) int lstat (const char *__restrict __path, struct stat *__restrict __buf ); int mknod (const char *__path, mode_t __mode, dev_t __dev ); #endif