]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
Fix a few compilation warnings in api.c
authorBharata B Rao <bharata@linux.vnet.ibm.com>
Mon, 13 Apr 2009 10:19:06 +0000 (15:49 +0530)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Mon, 13 Apr 2009 11:22:54 +0000 (16:52 +0530)
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -Wall -MT api.lo -MD -MP -MF .deps/api.Tpo -c api.c  -fPIC -DPIC -o .libs/api.o
api.c:52:1: warning: "VERSION" redefined
In file included from ./libcgroup-internal.h:21,
                 from api.c:31:
../config.h:129:1: warning: this is the location of the previous definition
api.c: In function 'cgroup_parse_rules':
api.c:353: warning: implicit declaration of function 'isblank'
api.c: In function 'cgroup_modify_cgroup':
api.c:1073: warning: implicit declaration of function 'asprintf'

This patch fixes the warning arising due to isblank, asprintf and getline.

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
src/api.c

index 99e71feb9ccef33ed794e858bb9b4a6109cf880b..4d5b5246f8a23a089127a62e8f6f96aeaaf481d2 100644 (file)
--- a/src/api.c
+++ b/src/api.c
  * for mistakes in APIs for reading statistics.
  */
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
 #include <dirent.h>
 #include <errno.h>
 #include <libcgroup.h>