[Ada] Add <stdlib.h> #include in cstreams.c
authorJoel Brobecker <brobecker@adacore.com>
Fri, 11 Mar 2022 04:22:26 +0000 (04:22 +0000)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 16 May 2022 08:42:05 +0000 (08:42 +0000)
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>

gcc/ada/

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

gcc/ada/cstreams.c

index e714162..48f996d 100644 (file)
@@ -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 */