summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2009-05-30 22:23:58 +0000
committerkmacy <kmacy@FreeBSD.org>2009-05-30 22:23:58 +0000
commit3b9ffe972e86709c49f8bd774244f584709604a8 (patch)
treeb02fd5938cb57833be3d79330c5f0d5c47249da9
parentd379120e43cca82a27e76d02526045e6b69d8d57 (diff)
downloadFreeBSD-src-3b9ffe972e86709c49f8bd774244f584709604a8.zip
FreeBSD-src-3b9ffe972e86709c49f8bd774244f584709604a8.tar.gz
fix xdrmem_control to be safe in an if statement
fix zfs to depend on krpc remove xdr from zfs makefile Submitted by: dchagin@freebsd.org
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c1
-rw-r--r--sys/modules/zfs/Makefile5
-rw-r--r--sys/rpc/xdr.h4
3 files changed, 3 insertions, 7 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
index a6829eb..f2c6e76 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
@@ -3121,3 +3121,4 @@ static moduledata_t zfs_mod = {
};
DECLARE_MODULE(zfsctrl, zfs_mod, SI_SUB_VFS, SI_ORDER_ANY);
MODULE_DEPEND(zfsctrl, opensolaris, 1, 1, 1);
+MODULE_DEPEND(zfsctrl, krpc, 1, 1, 1);
diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile
index c08a053..fc7049d 100644
--- a/sys/modules/zfs/Makefile
+++ b/sys/modules/zfs/Makefile
@@ -44,11 +44,6 @@ SRCS+= list.c
SRCS+= nvpair_alloc_system.c
SRCS+= taskq.c
-#.PATH: ${SUNW}/uts/common/rpc
-#SRCS+= opensolaris_xdr.c
-#SRCS+= opensolaris_xdr_array.c
-#SRCS+= opensolaris_xdr_mem.c
-
.PATH: ${SUNW}/uts/common/zmod
SRCS+= adler32.c
SRCS+= opensolaris_crc32.c
diff --git a/sys/rpc/xdr.h b/sys/rpc/xdr.h
index 9bc76b6..d57dd6b 100644
--- a/sys/rpc/xdr.h
+++ b/sys/rpc/xdr.h
@@ -216,8 +216,8 @@ xdr_putint32(XDR *xdrs, int32_t *ip)
(*(xdrs)->x_ops->x_destroy)(xdrs)
#define XDR_CONTROL(xdrs, req, op) \
- if ((xdrs)->x_ops->x_control) \
- (*(xdrs)->x_ops->x_control)(xdrs, req, op)
+ (((xdrs)->x_ops->x_control == NULL) ? (FALSE) : \
+ (*(xdrs)->x_ops->x_control)(xdrs, req, op))
#define xdr_control(xdrs, req, op) XDR_CONTROL(xdrs, req, op)
/*
OpenPOWER on IntegriCloud