diff options
Diffstat (limited to 'opt/rpcbind/musl-rpc-compat.c')
| -rw-r--r-- | opt/rpcbind/musl-rpc-compat.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/opt/rpcbind/musl-rpc-compat.c b/opt/rpcbind/musl-rpc-compat.c new file mode 100644 index 0000000..08dd3e4 --- /dev/null +++ b/opt/rpcbind/musl-rpc-compat.c @@ -0,0 +1,26 @@ +/* + * musl-rpc-compat.c - stubs for glibc NSS RPC functions missing in musl + * + * getrpcbynumber() and getrpcbyname() look up RPC service entries + * from /etc/rpc. musl does not implement these. The functions are + * only used for logging/display purposes in rpcbind, so returning + * NULL (not found) is safe. + */ + +#include <stddef.h> + +struct rpcent { + char *r_name; + char **r_aliases; + int r_number; +}; + +struct rpcent *getrpcbynumber(int number) { + (void)number; + return NULL; +} + +struct rpcent *getrpcbyname(const char *name) { + (void)name; + return NULL; +} |
