From: Holger Hoffstätte Date: Fri, 19 Jun 2020 15:22:54 +0000 (+0200) Subject: Prevent unnecessary xattr warning by reordering header inclusion. (#22) X-Git-Tag: v3.2.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c13e1b3f856621b1a3cb70d5efcb500d51e1539;p=thirdparty%2Frsync.git Prevent unnecessary xattr warning by reordering header inclusion. (#22) xattr headers have been provided by glibc (at least on Linux/glibc) for many years now. Reorder the inclusion of xattr headers to attempt compatibility/legacy after the common case. This prevents the warning without changing compatibility to non-glibc systems. * Add dependency on lib/sysxattrs.h header in Makefile Co-authored-by: Wayne Davison --- diff --git a/Makefile.in b/Makefile.in index 17dae3a6..31ddc43b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -100,6 +100,7 @@ rsync$(EXEEXT): $(OBJS) $(OBJS): $(HEADERS) $(CHECK_OBJS): $(HEADERS) +tls.o xattrs.o: lib/sysxattrs.h options.o: latest-year.h help-rsync.h help-rsyncd.h exclude.o: default-cvsignore.h loadparm.o: default-dont-compress.h diff --git a/lib/sysxattrs.h b/lib/sysxattrs.h index 428421a0..024bbd18 100644 --- a/lib/sysxattrs.h +++ b/lib/sysxattrs.h @@ -1,9 +1,9 @@ #ifdef SUPPORT_XATTRS -#if defined HAVE_ATTR_XATTR_H -#include -#elif defined HAVE_SYS_XATTR_H +#if defined HAVE_SYS_XATTR_H #include +#elif defined HAVE_ATTR_XATTR_H +#include #elif defined HAVE_SYS_EXTATTR_H #include #endif