about summary refs log tree commit diff
path: root/sunrpc/xdr_mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc/xdr_mem.c')
-rw-r--r--sunrpc/xdr_mem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sunrpc/xdr_mem.c b/sunrpc/xdr_mem.c
index 028329c34e..47b87eaf7a 100644
--- a/sunrpc/xdr_mem.c
+++ b/sunrpc/xdr_mem.c
@@ -80,7 +80,9 @@ xdrmem_create (xdrs, addr, size, op)
 {
 
   xdrs->x_op = op;
-  xdrs->x_ops = &xdrmem_ops;
+  /* We have to add the const since the `struct xdr_ops' in `struct XDR'
+     is not `const'.  */
+  xdrs->x_ops = (struct xdr_ops *) &xdrmem_ops;
   xdrs->x_private = xdrs->x_base = addr;
   xdrs->x_handy = size;
 }