From e69e015634a28d15ec651a17f900016b7b18df8f Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Sun, 18 Jan 2015 01:52:58 +0000 Subject: btrfs-progs: drop feature defines from C files, in favour of CFLAGS defines glibc 2.10+ (5+ years old) enables all the desired features: _XOPEN_SOURCE 700, __XOPEN2K8, POSIX_C_SOURCE, DEFAULT_SOURCE; with a single _GNU_SOURCE define in the makefile alone. For portability to other libc implementations (e.g. dietlibc) _XOPEN_SOURCE=700 is also defined. This also resolves Debian bug report filed by Michael Tautschnig - "Inconsistent use of _XOPEN_SOURCE results in conflicting declarations". Whilst I was not able to reproduce the results, the reported fact is that _XOPEN_SOURCE set to 500 in one set of files (e.g. cmds-filesystem.c) generates/defines different struct stat from other files (cmds-replace.c). This patch thus cleans up all feature defines, and sets them at a consistent level. Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747969 Signed-off-by: Dimitri John Ledkov Signed-off-by: David Sterba --- utils.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'utils.c') diff --git a/utils.c b/utils.c index 9b08144f..a818950f 100644 --- a/utils.c +++ b/utils.c @@ -17,10 +17,6 @@ * Boston, MA 021110-1307, USA. */ -#define _XOPEN_SOURCE 700 -#define __USE_XOPEN2K8 -#define __XOPEN2K8 /* due to an error in dirent.h, to get dirfd() */ -#define _GNU_SOURCE /* O_NOATIME */ #include #include #include -- cgit v1.2.3