diff options
author | Henrik Grindal Bakken <hgb@ifi.uio.no> | 2012-11-21 10:36:56 +0100 |
---|---|---|
committer | Tollef Fog Heen <tfheen@err.no> | 2012-11-21 10:49:58 +0100 |
commit | cf37cd2f305db327e05f8e001f5d84887f4fdfeb (patch) | |
tree | fa00f64a42d25f720b0af01919c5f45f1b26c994 | |
parent | 878836df2d714a9580ad31b9db88fda862e0df50 (diff) |
Add #ifdef guards around xattr usage
This adds #ifdef HAVE_ATTR_XATTR_H guards around all usage of xattr.
This unbreaks building with --disable-xattr when <attr/xattr.h> doesn't exist.
<attr/xattr.h> and usage of fsetxattr() without
-rw-r--r-- | src/core/socket.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/socket.c b/src/core/socket.c index f4f40afa9..3d5791b11 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -30,3 +30,5 @@ #include <mqueue.h> +#ifdef HAVE_ATTR_XATTR_H #include <attr/xattr.h> +#endif @@ -770,2 +772,3 @@ static void socket_apply_socket_options(Socket *s, int fd) { +#ifdef HAVE_ATTR_XATTR_H if (s->smack_ip_in) @@ -777,2 +780,3 @@ static void socket_apply_socket_options(Socket *s, int fd) { log_error("fsetxattr(\"security.SMACK64IPOUT\"): %m"); +#endif } @@ -787,2 +791,3 @@ static void socket_apply_fifo_options(Socket *s, int fd) { +#ifdef HAVE_ATTR_XATTR_H if (s->smack) @@ -790,2 +795,3 @@ static void socket_apply_fifo_options(Socket *s, int fd) { log_error("fsetxattr(\"security.SMACK64\"): %m"); +#endif } |