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 <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 */
#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>