From: Thomas Petazzoni Date: Tue, 12 Feb 2013 15:00:45 +0000 (-0500) Subject: rpcent: mark getrpcbyname name argument as const char * X-Git-Tag: libtirpc-0-2-3~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a7ec95a719e658568643d01a9dee888cf903033;p=libtirpc rpcent: mark getrpcbyname name argument as const char * This allows to match the glibc prototype and avoid compiling error when building libtirpc against a C library that has RPC support. Signed-off-by: Thomas Petazzoni Signed-off-by: Steve Dickson --- diff --git a/src/getrpcent.c b/src/getrpcent.c index 645f18f..1b54b6d 100644 --- a/src/getrpcent.c +++ b/src/getrpcent.c @@ -138,7 +138,7 @@ no_yp: struct rpcent * getrpcbyname(name) - char *name; + const char *name; { struct rpcent *rpc = NULL; char **rp; diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h index 5a0c3cf..c865e51 100644 --- a/tirpc/rpc/rpcent.h +++ b/tirpc/rpc/rpcent.h @@ -55,7 +55,7 @@ struct rpcent { }; /* Old interfaces that return a pointer to a static area; MT-unsafe */ -extern struct rpcent *getrpcbyname(char *); +extern struct rpcent *getrpcbyname(const char *); extern struct rpcent *getrpcbynumber(int); extern struct rpcent *getrpcent(void); #endif