File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I. -I$(VPATH) -I$(VPATH)/../li
2626ifdef PERSISTENT_CHOWN
2727 CPPFLAGS += -DPERSISTENT_CHOWN
2828 CPPFLAGS += $(shell pkg-config --cflags libprotobuf-c)
29+ HAS_ATTR_XATTR := $(shell if [ -f /usr/include/attr/xattr.h ]; then echo -DHAS_ATTR_XATTR; fi)
30+ CPPFLAGS += ${HAS_ATTR_XATTR}
2931endif
3032CFLAGS += -g -Wall -Wextra -O2
3133CFLAGS += $(shell pkg-config --cflags talloc)
Original file line number Diff line number Diff line change 4646
4747#if defined(PERSISTENT_CHOWN )
4848#include <unistd.h>
49+ #if defined(HAS_ATTR_XATTR )
4950#include <attr/xattr.h>
51+ #else
52+ #include <sys/xattr.h>
53+ #endif
5054#include "path/path.h"
5155#include "rootlesscontainers/rootlesscontainers.pb-c.h"
5256#define XATTR_USER_ROOTLESSCONTAINERS "user.rootlesscontainers"
You can’t perform that action at this time.
0 commit comments