diff options
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.patch | 48 |
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 0000000000..9664f2311b --- /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 + |