]> granicus.if.org Git - libtirpc/commitdiff
rpcent: mark getrpcbyname name argument as const char *
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 12 Feb 2013 15:00:45 +0000 (10:00 -0500)
committerSteve Dickson <steved@redhat.com>
Tue, 12 Feb 2013 15:01:33 +0000 (10:01 -0500)
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 <thomas.petazzoni@free-electrons.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
src/getrpcent.c
tirpc/rpc/rpcent.h

index 645f18f3e79f322c30b5dd17ac069eaa60fcd327..1b54b6d771be881279e98c57a0ca8b6780675ce6 100644 (file)
@@ -138,7 +138,7 @@ no_yp:
 
 struct rpcent *
 getrpcbyname(name)
-       char *name;
+       const char *name;
 {
        struct rpcent *rpc = NULL;
        char **rp;
index 5a0c3cf7731d8b0fec87f03867a2e2f0816763a8..c865e518654ad0e58bca04f25554336b7f18e52c 100644 (file)
@@ -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