summaryrefslogtreecommitdiff
path: root/src/metaentry.c
diff options
context:
space:
mode:
authorPrzemyslaw Pawelczyk <przemoc@gmail.com>2018-02-19 01:41:15 +0100
committerPrzemyslaw Pawelczyk <przemoc@gmail.com>2018-02-19 01:41:15 +0100
commitee36104279f55c26a0ec71abbe8cccbbd0bc3966 (patch)
tree97f34af490c40d58bf3475c03349bf165e80246c /src/metaentry.c
parentc7e0264a71d3101cf660a9da354a33792914fd76 (diff)
Support building with empty -DNO_XATTR= (equivalent to -DNO_XATTR=0).
Diffstat (limited to 'src/metaentry.c')
-rw-r--r--src/metaentry.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/metaentry.c b/src/metaentry.c
index 6c5bc84..da28723 100644
--- a/src/metaentry.c
+++ b/src/metaentry.c
@@ -26,7 +26,7 @@
#include <sys/stat.h>
#include <unistd.h>
-#if !defined(NO_XATTR) || !NO_XATTR
+#if !defined(NO_XATTR) || !(NO_XATTR+0)
# include <sys/xattr.h>
#endif /* !NO_XATTR */
@@ -52,7 +52,7 @@
# define PATH_MAX 4096
#endif
-#if !defined(NO_XATTR) || !NO_XATTR
+#if !defined(NO_XATTR) || !(NO_XATTR+0)
/* Free's a metaentry and all its parameters */
static void
mentry_free(struct metaentry *m)
@@ -195,14 +195,14 @@ mentries_print(const struct metahash *mhash)
struct metaentry *
mentry_create(const char *path)
{
-#if !defined(NO_XATTR) || !NO_XATTR
+#if !defined(NO_XATTR) || !(NO_XATTR+0)
ssize_t lsize, vsize;
char *list, *attr;
#endif /* !NO_XATTR */
struct stat sbuf;
struct passwd *pbuf;
struct group *gbuf;
-#if !defined(NO_XATTR) || !NO_XATTR
+#if !defined(NO_XATTR) || !(NO_XATTR+0)
int i;
#endif /* !NO_XATTR */
struct metaentry *mentry;
@@ -240,7 +240,7 @@ mentry_create(const char *path)
if (S_ISLNK(mentry->mode))
return mentry;
-#if !defined(NO_XATTR) || !NO_XATTR
+#if !defined(NO_XATTR) || !(NO_XATTR+0)
lsize = listxattr(path, NULL, 0);
if (lsize < 0) {
/* Perhaps the FS doesn't support xattrs? */