summaryrefslogtreecommitdiff
path: root/utils-lib.c
Commit message (Collapse)AuthorAge
* btrfs-progs: move lookup_path_rootid to library utilsDavid Sterba2016-11-24
| | | | | | | | | | | The refactoring in commit 1c85c3de5aab997ff66ea95cb0f2c9f79726ec40 has broken use of libbtrfs that does not exhibit during build but at the run time. Fixes: 1c85c3de5aab997ff66ea95cb0f2c9f79726ec40 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>
* btrfs-progs: drop feature defines from C files, in favour of CFLAGS definesDimitri John Ledkov2015-01-27
| | | | | | | | | | | | | | | | | | | | | | 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>
* btrfs-progs: move arg_strtou64 to a separate file for libraryDavid Sterba2014-05-02
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>