[1/1] libc/include/sys/stat.h: Adjust for RTEMS MIPS
Commit Message
The commit cited below introduced changes which included
conditionals strictly on __mips__. This ignored tailoring
for any environment on MIPS except that targeted by the
author of the change. This patch just fixes this code for
RTEMS.
commit 467a2bdf17ad376dafada9f1734784f4611fa6fd
Author: Jovan Dmitrović <jovan.dmitrovic@htecgroup.com>
Date: Wed Jun 11 10:11:33 2025 +0200
mips: Implement MIPS HAL and UHI
Implement abstract interface for MIPS, including unified hosting
interface (UHI).
Signed-off-by: Jovan Dmitrović <jovan.dmitrovic@htecgroup.com>
---
newlib/libc/include/sys/stat.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Comments
On Jul 16 14:17, Joel Sherrill wrote:
> The commit cited below introduced changes which included
> conditionals strictly on __mips__. This ignored tailoring
> for any environment on MIPS except that targeted by the
> author of the change. This patch just fixes this code for
> RTEMS.
>
> commit 467a2bdf17ad376dafada9f1734784f4611fa6fd
> Author: Jovan Dmitrović <jovan.dmitrovic@htecgroup.com>
> Date: Wed Jun 11 10:11:33 2025 +0200
>
> mips: Implement MIPS HAL and UHI
>
> Implement abstract interface for MIPS, including unified hosting
> interface (UHI).
>
> Signed-off-by: Jovan Dmitrović <jovan.dmitrovic@htecgroup.com>
> ---
> newlib/libc/include/sys/stat.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Sounds right to me. Please push.
Thanks,
Corinna
@@ -38,7 +38,7 @@ struct stat
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
-#elif defined(__mips__)
+#elif defined(__mips__) && !defined(__rtems__)
time_t st_atime;
long st_spare1;
time_t st_mtime;
@@ -60,7 +60,8 @@ struct stat
#endif
};
-#if !((defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)) || defined(__mips__))
+#if !((defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)) || \
+ (defined(__mips__) && !defined(__rtems__)))
#define st_atime st_atim.tv_sec
#define st_ctime st_ctim.tv_sec
#define st_mtime st_mtim.tv_sec