From: Noah Watkins Date: Sat, 20 Jul 2013 18:10:24 +0000 (-0700) Subject: fuse: fix fuse_getgroups detection X-Git-Tag: v0.68~140 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3846bf2f1a4dac3c52f1131ce6d096cde523cc84;p=ceph.git fuse: fix fuse_getgroups detection The ac_check_func fails because -lfuse is not in LIBS. This also enables code that wasn't being compiled, and fixes compiler errors that resulted. Signed-off-by: Noah Watkins Reviewed-by: Sage Weil --- diff --git a/configure.ac b/configure.ac index bdcf4fc557bb..bb03ad5b76f9 100644 --- a/configure.ac +++ b/configure.ac @@ -250,7 +250,10 @@ AS_IF([test "x$with_fuse" != xno], [Define if you have fuse]) HAVE_LIBFUSE=1 # look for fuse_getgroups and define FUSE_GETGROUPS if found + LIBS_saved="$LIBS" + LIBS="$LIBS -lfuse" AC_CHECK_FUNCS([fuse_getgroups]) + LIBS="$LIBS_saved" ], [AC_MSG_FAILURE( [no FUSE found (use --without-fuse to disable)])])]) diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc index 83395534d0dc..ce0c6de12605 100644 --- a/src/client/fuse_ll.cc +++ b/src/client/fuse_ll.cc @@ -14,6 +14,7 @@ #define FUSE_USE_VERSION 26 +#include #include #include #include @@ -520,7 +521,7 @@ static int getgroups_cb(void *handle, uid_t uid, gid_t **sgids) return 0; } - *sgids = malloc(c*sizeof(**sgids)); + *sgids = (gid_t*)malloc(c*sizeof(**sgids)); if (!*sgids) { return -ENOMEM; }