summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@fb.com>2017-07-06 08:52:44 -0700
committerJeff Darcy <jeff@pl.atyp.us>2017-07-06 19:05:23 +0000
commitfb4445816a9775daf32b590d0158ef0271c2c866 (patch)
tree9fa49e45b59d3b05e207a69ddfd69c9a5e9a5304
parentb6e84d469993ceff1c0d6f3201cbcecdfa17eb06 (diff)
Build/test fixes - build_env, tirpc, mem-pool, cleanup
Differential Revision: https://phabricator.intern.facebook.com/D5376801 Change-Id: I5bf733a395ef2b85065200fa5810ced27ee0d682 Reviewed-on: https://review.gluster.org/17719 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
-rw-r--r--configure.ac6
-rw-r--r--libglusterfs/src/mem-pool.c2
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c2
-rw-r--r--rpc/rpc-lib/src/rpcsvc.c2
-rw-r--r--rpc/rpc-lib/src/xdr-common.h7
-rw-r--r--rpc/rpc-transport/socket/src/socket.c1
-rw-r--r--tests/include.rc1
-rw-r--r--xlators/nfs/server/src/mount3.c5
8 files changed, 21 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 59a3f865709..f556c3b12a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -986,9 +986,9 @@ TESTER_CFLAGS=""
dnl include tirpc for FB builds
if test "x$BUILD_FBEXTRAS" = "xyes"; then
TIRPC_CFLAGS="-I/usr/include/tirpc"
- GF_LDFLAGS="-lfbtirpc $GF_LDFLAGS"
- GF_CFLAGS="$GF_CFLAGS $TIRPC_CFLAGS -DIPV6_DEFAULT -DGF_FBEXTRAS"
- TESTER_CFLAGS="$TESTER_CFLAGS -lfbtirpc"
+ GF_LDFLAGS="-ltirpc $GF_LDFLAGS"
+ GF_CFLAGS="$TIRPC_CFLAGS $GF_CFLAGS -DIPV6_DEFAULT -DGF_FBEXTRAS"
+ TESTER_CFLAGS="$TESTER_CFLAGS -ltirpc"
fi
dnl check for gcc -Werror=format-security
diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c
index 4d81ade8b60..d189be7960e 100644
--- a/libglusterfs/src/mem-pool.c
+++ b/libglusterfs/src/mem-pool.c
@@ -533,6 +533,7 @@ fwd_addr_out:
}
+#ifndef DISABLE_MEMPOOL
static int
__is_member (struct mem_pool *pool, void *ptr)
{
@@ -551,6 +552,7 @@ __is_member (struct mem_pool *pool, void *ptr)
return 1;
}
+#endif
void
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index be18ed9f305..014b2a25d11 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -21,6 +21,8 @@
#include "xdr-rpc.h"
#include "rpc-common-xdr.h"
+#pragma GCC diagnostic ignored "-Wformat="
+
void
rpc_clnt_reply_deinit (struct rpc_req *req, struct mem_pool *pool);
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c
index ed23f547e53..87a918ce8cb 100644
--- a/rpc/rpc-lib/src/rpcsvc.c
+++ b/rpc/rpc-lib/src/rpcsvc.c
@@ -44,6 +44,8 @@
#include "xdr-rpcclnt.h"
#include "glusterfs-acl.h"
+#pragma GCC diagnostic ignored "-Wformat="
+
struct rpcsvc_program gluster_dump_prog;
#define rpcsvc_alloc_request(svc, request) \
diff --git a/rpc/rpc-lib/src/xdr-common.h b/rpc/rpc-lib/src/xdr-common.h
index 596ac99640f..211e33272ba 100644
--- a/rpc/rpc-lib/src/xdr-common.h
+++ b/rpc/rpc-lib/src/xdr-common.h
@@ -105,4 +105,11 @@ unsigned long xdr_sizeof (xdrproc_t func, void *data);
#define xdr_decoded_length(xdr) (((size_t)(&xdr)->x_private) - ((size_t)(&xdr)->x_base))
+/*
+ * The TIRPC headers rather annoyingly don't define this, even though it
+ * actually exists.
+ */
+extern u_long xdr_sizeof (xdrproc_t freebsd_compiler_is_broken,
+ void *so_is_net_bsd);
+
#endif
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 76609fbbc7a..40a25bdba83 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -38,6 +38,7 @@
#include <errno.h>
#include <rpc/xdr.h>
#include <sys/ioctl.h>
+
#define GF_LOG_ERRNO(errno) ((errno == ENOTCONN) ? GF_LOG_DEBUG : GF_LOG_ERROR)
#define SA(ptr) ((struct sockaddr *)ptr)
diff --git a/tests/include.rc b/tests/include.rc
index 12f70e991c8..de3b90ee86b 100644
--- a/tests/include.rc
+++ b/tests/include.rc
@@ -426,6 +426,7 @@ stat -c %s /dev/null > /dev/null 2>&1 || {
function cleanup()
{
+ cd # Things go pear-shaped if we're inside a Gluster mount.
# Prepare flags for umount
case `uname -s` in
diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c
index d6b07ed801c..7e008b40c85 100644
--- a/xlators/nfs/server/src/mount3.c
+++ b/xlators/nfs/server/src/mount3.c
@@ -1747,7 +1747,7 @@ mnt3_check_client_net_udp (struct svc_req *req, char *volname, xlator_t *nfsx)
if ((!req) || (!volname) || (!nfsx))
goto err;
- sin = svc_getcaller (req->rq_xprt);
+ sin = (struct sockaddr_in *)svc_getcaller (req->rq_xprt);
if (!sin)
goto err;
@@ -2827,7 +2827,8 @@ __mnt3udp_get_export_subdir_inode (struct svc_req *req, char *subdir,
/* AUTH check for subdir i.e. nfs.export-dir */
if (exp->hostspec) {
- struct sockaddr_in *sin = svc_getcaller (req->rq_xprt);
+ struct sockaddr_in *sin;
+ sin = (struct sockaddr_in *)svc_getcaller (req->rq_xprt);
ret = mnt3_verify_auth (sin, exp);
if (ret) {
gf_msg (GF_MNT, GF_LOG_ERROR, EACCES,