[Ada] Add <stdlib.h> #include in cstreams.c

Message ID 20220516084312.GA3843664@adacore.com
State Committed
Commit 9abb17d9fad628a237136b3348ca33f189d2ad2b
Headers
Series [Ada] Add <stdlib.h> #include in cstreams.c |

Commit Message

Pierre-Marie de Rodat May 16, 2022, 8:43 a.m. UTC
  When building the GNAT runtime for QNX, we get the following warning:

| cstreams.c: In function '__gnat_full_name':
| cstreams.c:209:5: warning: implicit declaration of function 'realpath'
|                   [-Wimplicit-function-declaration]
|   209 |     realpath (nam, buffer);
|       |     ^~~~~~~~

This commit fixes the warning by adding the corresponding #include
of <stdlib.h>

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* cstreams.c: Add <stdlib.h> #include.
  

Patch

diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c
--- a/gcc/ada/cstreams.c
+++ b/gcc/ada/cstreams.c
@@ -46,6 +46,7 @@ 
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#include <stdlib.h>
 
 #ifdef _AIX
 /* needed to avoid conflicting declarations */