[PATCH 1/5] libcsupport/src/__times.c: fix warning

Matthew Joyce matthew.joyce at embedded-brains.de
Wed Jun 8 13:34:49 UTC 2022


From: Matt Joyce <matthew.joyce at embedded-brains.de>

Define _LIBC to access prototype for _times() function. This fixes a
new warning in gcc 12.
---
 cpukit/libcsupport/src/__times.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cpukit/libcsupport/src/__times.c b/cpukit/libcsupport/src/__times.c
index 629a7bc633..1a994ad953 100644
--- a/cpukit/libcsupport/src/__times.c
+++ b/cpukit/libcsupport/src/__times.c
@@ -42,6 +42,11 @@
  */
 #define _COMPILING_NEWLIB
 
+/*
+ *  Needed to get the prototype for _times()
+ */
+#define _LIBC
+
 #include <rtems.h>
 
 #include <sys/times.h>
-- 
2.31.1



More information about the devel mailing list