]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
Remove GNU_SOURCE from public headers
authorJan Safranek <jsafrane@redhat.com>
Mon, 8 Mar 2010 11:45:57 +0000 (12:45 +0100)
committerDhaval Giani <dhaval.giani@gmail.com>
Mon, 8 Mar 2010 14:02:35 +0000 (15:02 +0100)
Remove GNU_SOURCE from public headers, it has unpredictable consequences on
applications using libcgroup.h

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
include/libcgroup.h
src/tools/cgconfig.c

index c8f124076d951b1988e924d2aae78eb048266f92..8a24bf74507c59a23344537f5600c56e0517c10e 100644 (file)
@@ -26,14 +26,6 @@ __BEGIN_DECLS
 #include <sys/types.h>
 #include <linux/cn_proc.h>
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef __USE_GNU
-#define __USE_GNU
-#endif
-
 /* Maximum number of mount points/controllers */
 #define MAX_MNT_ELEMENTS       8
 /* Estimated number of groups created */
index cc33ad9fa812f2651234f826e9f277de588e525d..e426b760685577760d6455b195db87d04f596c21 100644 (file)
 
 #include <libcgroup.h>
 #include <libcgroup-internal.h>
+
+/* For basename() */
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <string.h>
+#include <libgen.h>
+
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
 #include <errno.h>
 #include <getopt.h>