Commit Graph

3 Commits (eb7b42003a7d3a1d4c0253c6d5a248c9078c6d19)

Author SHA1 Message Date
David Sterba e5362f5feb btrfs-progs: move lookup_path_rootid to library utils
The refactoring in commit 1c85c3de5a has
broken use of libbtrfs that does not exhibit during build but at the run
time.

Fixes: 1c85c3de5a
Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=600078
Reported-by: Mike Gilbert <floppymaster@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-24 13:06:36 +01:00
Dimitri John Ledkov e69e015634 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>
2015-01-27 14:45:59 +01:00
David Sterba aa46922c09 btrfs-progs: move arg_strtou64 to a separate file for library
Linking with libbtrfs fails because arg_strtou64 is not defined and we
cannot just add utils.o to library objects because it's not
library-clean.

Reported-by: Arvin Schnell <aschnell@suse.com>
Reported-by: Anton Farygin <rider@altlinux.org>
Signed-off-by: David Sterba <dsterba@suse.cz>
2014-05-02 17:04:28 +02:00