Commit 18828103 authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Peter Korsgaard
Browse files

libtirpc: add patches to fix a number of issues

libtirpc-0005-rpcent-mark-getrpcbyname-name-argument-as-const-char.patch
fixes build failures like
http://autobuild.buildroot.org/results/7a3a751fe02c639ca75c575ca7fe20a72372b8d6/build-end.log

.

libtirpc-0006-rpcent-remove-prototypes-of-reentrant-variants.patch
ensures that functions not implemented by libtirpc are not described
in a header file. It also allows to remove those prototypes that were
not matching the functions available in glibc or uClibc, causing
mismatch in prototypes.

libtirpc-0007-doc-Makefile.am-fix-out-of-tree-installation.patch is a
minor fix.

The following patches (8 to 9) allow libtirpc to provide sufficient
things to be able to build rpcbind on top of it.

All these patches have been submitted upstream on the libtirpc-devel@
mailing list.

Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: default avatarArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 9346b1b9
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
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
+33 −0
Original line number Diff line number Diff line
From 8e02780905a3e13405a5a1b9f5b2e77655d5c7fb Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Sat, 10 Nov 2012 00:05:23 +0100
Subject: [PATCH] rpcent: remove prototypes of reentrant variants

The reentrant variants of getrpcbynumber() and al. are not implemented
by libtirpc, so there is no point in advertising them in this header
file.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 tirpc/rpc/rpcent.h |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h
index 120801d..45775ed 100644
--- a/tirpc/rpc/rpcent.h
+++ b/tirpc/rpc/rpcent.h
@@ -55,11 +55,6 @@ struct rpcent {
 	int	r_number;	/* rpc program number */
 };
 
-extern struct rpcent *getrpcbyname_r(const char *, struct rpcent *,
-					char *, int);
-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(const char *);
 extern struct rpcent *getrpcbynumber(int);
-- 
1.7.9.5
+24 −0
Original line number Diff line number Diff line
From 4cf0371c96abf83483835daf50d3fc3bf793bdc4 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Sat, 10 Nov 2012 17:29:12 +0100
Subject: [PATCH] doc/Makefile.am: fix out-of-tree installation

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 doc/Makefile.am |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index cc4fa76..bac7c0f 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,5 +1,5 @@
 
 install: install-am
 	$(mkinstalldirs) $(DESTDIR)/etc
-	cp -p ./etc_netconfig $(DESTDIR)/etc/netconfig
+	cp -p $(srcdir)/etc_netconfig $(DESTDIR)/etc/netconfig
 	chmod 0644 $(DESTDIR)/etc/netconfig
-- 
1.7.9.5
+6504 −0

File added.

Preview size limit exceeded, changes collapsed.

+999 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading