summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBharata B Rao <bharata@linux.vnet.ibm.com>2009-04-13 15:49:06 +0530
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2009-04-13 16:52:54 +0530
commit8d8a747b161508ebfd48a6dac52f1438e2714a2b (patch)
tree44f10863bc19ce23954a9dd9f33003aba65405e5
parenta2e27126706502134a1ed228391dd7bbd78aeb1b (diff)
downloadlibcg-8d8a747b161508ebfd48a6dac52f1438e2714a2b.tar.gz
libcg-8d8a747b161508ebfd48a6dac52f1438e2714a2b.tar.xz
libcg-8d8a747b161508ebfd48a6dac52f1438e2714a2b.zip
Fix a few compilation warnings in api.c
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>
-rw-r--r--src/api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api.c b/src/api.c
index 99e71fe..4d5b524 100644
--- a/src/api.c
+++ b/src/api.c
@@ -25,6 +25,10 @@
* for mistakes in APIs for reading statistics.
*/
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#include <dirent.h>
#include <errno.h>
#include <libcgroup.h>