summaryrefslogtreecommitdiffstats
path: root/package/libtirpc/libtirpc-0005-rpcent-mark-getrpcbyname-name-argument-as-const-char.patch
blob: b1865aee7002a2b279ae79d51cede3835ac1102c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 88147b753b86df7e7505ef8150f1329f7c6951cc Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Fri, 9 Nov 2012 19:37:24 +0100
Subject: [PATCH] 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 <thomas.petazzoni@free-electrons.com>
---
 src/getrpcent.c    |    2 +-
 tirpc/rpc/rpcent.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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 8ce05ed..120801d 100644
--- a/tirpc/rpc/rpcent.h
+++ b/tirpc/rpc/rpcent.h
@@ -61,7 +61,7 @@ extern struct rpcent *getrpcbynumber_r(int, struct rpcent *, char *, int);
 extern struct rpcent *getrpcent_r(struct rpcent *, char *, int);
 
 /* 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
-- 
1.7.9.5

OpenPOWER on IntegriCloud