diff mbox

[fortran] : Include stdlib.h in intrinsics/getcwd.c

Message ID CAFULd4YV0RJ-cR7j-F2OfHwYKFfjZ-SAOoMmyVdJ-_1L_7STxg@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak May 27, 2014, 7:44 a.m. UTC
... to avoid "implicit declaration of function ‘free’" warning.

2014-05-27  Uros Bizjak  <ubizjak@gmail.com>

    * intrinsics/getcwd.c: Include stdlib.h.

Tested on x86_64-pc-linux-gnu.

OK for mainline?

Uros.

Comments

Steve Kargl May 27, 2014, 11:37 a.m. UTC | #1
On Tue, May 27, 2014 at 09:44:22AM +0200, Uros Bizjak wrote:
> ... to avoid "implicit declaration of function ???free???" warning.
> 
> 2014-05-27  Uros Bizjak  <ubizjak@gmail.com>
> 
>     * intrinsics/getcwd.c: Include stdlib.h.
> 
> Tested on x86_64-pc-linux-gnu.
> 
> OK for mainline?
> 

Yes.

It can also be committed to the 4.9 branch if you have the time.
Uros Bizjak May 27, 2014, 3 p.m. UTC | #2
On Tue, May 27, 2014 at 1:37 PM, Steve Kargl
<sgk@troutmask.apl.washington.edu> wrote:

>> ... to avoid "implicit declaration of function ???free???" warning.
>>
>> 2014-05-27  Uros Bizjak  <ubizjak@gmail.com>
>>
>>     * intrinsics/getcwd.c: Include stdlib.h.

> It can also be committed to the 4.9 branch if you have the time.

There is no need for stdlib.h include in the 4.9 branch, the call to
"free" was introduced in 4.10.

Uros.
diff mbox

Patch

Index: intrinsics/getcwd.c
===================================================================
--- intrinsics/getcwd.c (revision 210956)
+++ intrinsics/getcwd.c (working copy)
@@ -25,6 +25,7 @@ 

 #include "libgfortran.h"

+#include <stdlib.h>
 #include <string.h>
 #include <errno.h>