summaryrefslogtreecommitdiffstats
path: root/main/libtirpc/0006-Define-struct-rpcent-on-non-GNU-libc.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-12-16 13:09:16 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-12-16 13:09:16 +0000
commit94d5a5ec541a1275519db22a70609a62c1fef88c (patch)
tree270735fb789eb14d8451221dd6b5bcd14b0f2144 /main/libtirpc/0006-Define-struct-rpcent-on-non-GNU-libc.patch
parent18eb199691fe7b75716793aa8fcb4ad36ea13419 (diff)
downloadaports-94d5a5ec541a1275519db22a70609a62c1fef88c.tar.bz2
aports-94d5a5ec541a1275519db22a70609a62c1fef88c.tar.xz
main/libtirpc: rebase patches
those patches were sent upstream
Diffstat (limited to 'main/libtirpc/0006-Define-struct-rpcent-on-non-GNU-libc.patch')
-rw-r--r--main/libtirpc/0006-Define-struct-rpcent-on-non-GNU-libc.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/main/libtirpc/0006-Define-struct-rpcent-on-non-GNU-libc.patch b/main/libtirpc/0006-Define-struct-rpcent-on-non-GNU-libc.patch
new file mode 100644
index 000000000..9664f2311
--- /dev/null
+++ b/main/libtirpc/0006-Define-struct-rpcent-on-non-GNU-libc.patch
@@ -0,0 +1,48 @@
+From 182305b99d3a63b6caf72fe5abba3fb88ebea679 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 15 Dec 2014 14:55:37 +0100
+Subject: [PATCH 6/9] Define struct rpcent on non GNU libc
+
+This fixes the following compile error with musl libc:
+getrpcent.c:65:16: error: field 'rpc' has incomplete type
+ struct rpcent rpc;
+ ^
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+This patch could probably be better. It assumes that only GNU libc has
+the rpcent struct defined, but the BSDs probably has it too.
+
+I am not sure if uClibc has it, but uClibc does define __GLIBC__ so it
+might be broken there too.
+
+I looked into using AC_CHECK_MEMBER but I don't think it is a good idea
+so depend on config.h since this is a header that will be installed on
+the system.
+
+I also found out that struct rpcent is also defined in
+/usr/include/gssrpc/netdb.h but I am unsure if we can depend on that
+too since GSS is optional.
+
+So I am a bit in doubt what the proper fix is. Meanwhile, this works
+for musl libc.
+
+ tirpc/rpc/rpcent.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h
+index 6619cd3..147f909 100644
+--- a/tirpc/rpc/rpcent.h
++++ b/tirpc/rpc/rpcent.h
+@@ -49,7 +49,7 @@ extern "C" {
+ #endif
+
+ /* These are defined in /usr/include/rpc/netdb.h */
+-#if 0
++#if !defined(__GLIBC__)
+ struct rpcent {
+ char *r_name; /* name of server for this rpc program */
+ char **r_aliases; /* alias list */
+--
+2.2.0
+