[PATCH v2 2/6] cpukit/posix/src/_execve.c: fix warning

Matthew Joyce matthew.joyce at embedded-brains.de
Fri Jun 10 13:34:55 UTC 2022


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

Define _LIBC to access prototype for _execve() function. This fixes a
new warning in gcc 12.

Updates #4662
---
 cpukit/posix/src/_execve.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cpukit/posix/src/_execve.c b/cpukit/posix/src/_execve.c
index 2858d13082..f1b9d9d3a1 100644
--- a/cpukit/posix/src/_execve.c
+++ b/cpukit/posix/src/_execve.c
@@ -43,9 +43,11 @@
 #endif
 
 /*
- *  Needed to get the prototype for this newlib helper method
+ *  Needed to get the prototype for this newlib helper method. Which define
+ *  is required depends on the version of newlib.
  */
 #define _COMPILING_NEWLIB
+#define _LIBC
 
 #include <errno.h>
 #include <rtems/seterr.h>
-- 
2.31.1



More information about the devel mailing list