diff options
| -rw-r--r-- | include/rpc/clnt.h | 4 | ||||
| -rw-r--r-- | libc/inet/rpc/clnt_unix.c | 4 | 
2 files changed, 6 insertions, 2 deletions
| diff --git a/include/rpc/clnt.h b/include/rpc/clnt.h index 72801e382..0dcadcb5a 100644 --- a/include/rpc/clnt.h +++ b/include/rpc/clnt.h @@ -132,6 +132,10 @@ struct rpc_err {  typedef struct CLIENT CLIENT;  struct CLIENT {    AUTH	*cl_auth;		 /* authenticator */ +  /* not sure whether non-const-ness is a part of the spec... if it is, +   * enclose "const" in #ifdef UCLIBC_INTERNAL / #endif +   * to make it effective only for libc compile */ +  const    struct clnt_ops {      enum clnt_stat (*cl_call) (CLIENT *, u_long, xdrproc_t, caddr_t, xdrproc_t,  			       caddr_t, struct timeval); diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c index b412ccb7d..3a1e13c05 100644 --- a/libc/inet/rpc/clnt_unix.c +++ b/libc/inet/rpc/clnt_unix.c @@ -116,7 +116,7 @@ static bool_t clntunix_freeres (CLIENT *, xdrproc_t, caddr_t);  static bool_t clntunix_control (CLIENT *, int, char *);  static void clntunix_destroy (CLIENT *); -static struct clnt_ops unix_ops = +static const struct clnt_ops unix_ops =  {    clntunix_call,    clntunix_abort, @@ -474,7 +474,7 @@ __msgread (int sock, void *data, size_t cnt)    struct iovec iov;    struct msghdr msg;  #ifdef SCM_CREDENTIALS -  static char cm[CMSG_SPACE(sizeof (struct ucred))]; +  /*static -why??*/ char cm[CMSG_SPACE(sizeof (struct ucred))];  #endif    int len; | 
