Remove GNU_SOURCE from public headers, it has unpredictable consequences on
applications using libcgroup.h

Signed-off-by: Jan Safranek <[email protected]>
---

 include/libcgroup.h  |    8 --------
 src/tools/cgconfig.c |    9 ++++++++-
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/include/libcgroup.h b/include/libcgroup.h
index c8f1240..8a24bf7 100644
--- a/include/libcgroup.h
+++ b/include/libcgroup.h
@@ -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 */
diff --git a/src/tools/cgconfig.c b/src/tools/cgconfig.c
index cc33ad9..e426b76 100644
--- a/src/tools/cgconfig.c
+++ b/src/tools/cgconfig.c
@@ -19,9 +19,16 @@
 
 #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>
 


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to