diff options
author | Ben Brewer <ben.brewer@codethink.co.uk> | 2014-05-29 14:31:42 +0100 |
---|---|---|
committer | Ben Brewer <ben.brewer@codethink.co.uk> | 2014-06-02 11:02:59 +0100 |
commit | 1dea1372f801e55d09e4abc0c429a479a1ea1bcc (patch) | |
tree | fce1af82b493ed9207b14ba77bf524637d5c20c4 /tbdiff/tbdiff-xattrs.c | |
parent | 3b703fd98b1bfb5d34c3668bf07412b1bc93cf54 (diff) | |
download | tbdiff-1dea1372f801e55d09e4abc0c429a479a1ea1bcc.tar.gz |
Use sys/xattr from libc if attr/xattr is unavailable
On my system tbdiff failed to build because attr/xattr doesn't
exist, also the attr package was not easy to find.
On searching I discovered that the functionality we use in attr.h
is provided by modern versions of libc, as shown here:
https://bugzilla.kernel.org/show_bug.cgi?id=70141
This patch falls back to using libc sys/xattr.h when attr/xattr.h
is unavailable.
Diffstat (limited to 'tbdiff/tbdiff-xattrs.c')
-rw-r--r-- | tbdiff/tbdiff-xattrs.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tbdiff/tbdiff-xattrs.c b/tbdiff/tbdiff-xattrs.c index 95d263f..0f2adc8 100644 --- a/tbdiff/tbdiff-xattrs.c +++ b/tbdiff/tbdiff-xattrs.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2012 Codethink Ltd. + * Copyright (C) 2011-2014 Codethink Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License Version 2 as @@ -18,7 +18,14 @@ #include <string.h> #include <stdlib.h> +#include "config.h" + +#if HAVE_ATTR_XATTR_H #include <attr/xattr.h> +#else +#include <sys/xattr.h> +#endif + #include <errno.h> #include <tbdiff/tbdiff-common.h> |