diff options
Diffstat (limited to 'src/common/xattr.c')
-rw-r--r-- | src/common/xattr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/xattr.c b/src/common/xattr.c index 5ae399416da..5d850baabca 100644 --- a/src/common/xattr.c +++ b/src/common/xattr.c @@ -18,6 +18,9 @@ #include "acconfig.h" +#include <errno.h> +#include <stdlib.h> + /* * The original FreeBSD port below (now guarded by HAVE_EXTATTR) was using * FreeBSD specific string manipulation routines. @@ -156,7 +159,7 @@ ssize_t ceph_os_fgetxattr(int fd, const char *name, void *value, size_t size) ssize_t ceph_os_listxattr(const char *path, char *list, size_t size) { - ssize_t error; + ssize_t error = 0; #ifdef HAVE_EXTATTR /* @@ -206,7 +209,7 @@ ssize_t ceph_os_listxattr(const char *path, char *list, size_t size) ssize_t ceph_os_flistxattr(int fd, char *list, size_t size) { - ssize_t error; + ssize_t error = 0; #ifdef HAVE_EXTATTR /* |