about summary refs log tree commit diff
path: root/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/xdr_mem.c4
-rw-r--r--sunrpc/xdr_rec.c4
-rw-r--r--sunrpc/xdr_stdio.c4
3 files changed, 9 insertions, 3 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;
 }
diff --git a/sunrpc/xdr_rec.c b/sunrpc/xdr_rec.c
index f855b3d90e..a4e28b0548 100644
--- a/sunrpc/xdr_rec.c
+++ b/sunrpc/xdr_rec.c
@@ -169,7 +169,9 @@ xdrrec_create (XDR *xdrs, u_int sendsize,
   /*
    * now the rest ...
    */
-  xdrs->x_ops = &xdrrec_ops;
+  /* We have to add the const since the `struct xdr_ops' in `struct XDR'
+     is not `const'.  */
+  xdrs->x_ops = (struct xdr_ops *) &xdrrec_ops;
   xdrs->x_private = (caddr_t) rstrm;
   rstrm->tcp_handle = tcp_handle;
   rstrm->readit = readit;
diff --git a/sunrpc/xdr_stdio.c b/sunrpc/xdr_stdio.c
index 75c563daa9..8c3c5c7bb3 100644
--- a/sunrpc/xdr_stdio.c
+++ b/sunrpc/xdr_stdio.c
@@ -82,7 +82,9 @@ xdrstdio_create (xdrs, file, op)
 {
 
   xdrs->x_op = op;
-  xdrs->x_ops = &xdrstdio_ops;
+  /* We have to add the const since the `struct xdr_ops' in `struct XDR'
+     is not `const'.  */
+  xdrs->x_ops = (struct xdr_ops *) &xdrstdio_ops;
   xdrs->x_private = (caddr_t) file;
   xdrs->x_handy = 0;
   xdrs->x_base = 0;