GNOME Bugzilla – Bug 770685
core: Include stdlib.h for free() and realpath()
Last modified: 2016-09-07 13:16:31 UTC
Without this, building for example on ppc64le yields: [ 136s] load.c: In function 'do_setup': [ 136s] load.c:121:30: warning: implicit declaration of function 'realpath' [-Wimplicit-function-declaration] [ 136s] gchar *resolved_path = realpath (path, NULL); [ 136s] ^~~~~~~~ [ 136s] load.c:121:30: warning: initialization makes pointer from integer without a cast [-Wint-conversion] [ 136s] load.c:141:15: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration] [ 136s] free (resolved_path); [ 136s] ^~~~ [ 136s] load.c:141:15: warning: incompatible implicit declaration of built-in function 'free' [ 136s] load.c:141:15: note: include '<stdlib.h>' or provide a declaration of 'free' [ 136s] load.c:145:11: warning: incompatible implicit declaration of built-in function 'free' [ 136s] free (resolved_path); [ 136s] ^~~~ [ 136s] load.c:145:11: note: include '<stdlib.h>' or provide a declaration of 'free'
Created attachment 334564 [details] [review] core: Include stdlib.h for free() and realpath()
*** Bug 770984 has been marked as a duplicate of this bug. ***
commit 52b005062d2ee33ec4f58caeb61544c346af05f8 Author: Øyvind Kolås <pippin@gimp.org> Date: Wed Sep 7 15:11:57 2016 +0200 load: readd include stdlib.h bug #1373722