summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDimitri John Ledkov <dimitri.j.ledkov@intel.com>2015-01-18 01:52:58 +0000
committerDavid Sterba <dsterba@suse.cz>2015-01-27 14:45:59 +0100
commite69e015634a28d15ec651a17f900016b7b18df8f (patch)
tree91fd39eb9cc9c1bddd29344ef6857f9cc7e110d6 /Makefile
parent34c28896e87047d7888c407984598bdf861bbca1 (diff)
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 <dimitri.j.ledkov@intel.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 119bf3e9..94f1106e 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ export
CC = gcc
LN = ln
AR = ar
-AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64 -DBTRFS_FLAT_INCLUDES -fno-strict-aliasing -fPIC
+AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64 -DBTRFS_FLAT_INCLUDES -D_XOPEN_SOURCE=700 -D_GNU_SOURCE -fno-strict-aliasing -fPIC
CFLAGS = -g -O1 -fno-strict-aliasing
LDFLAGS = -rdynamic
objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \