mirror of
https://github.com/openwrt/packages.git
synced 2026-01-10 11:44:48 +00:00
nfs-kernel-server: import from packages
Signed-off-by: Peter Wagner <tripolar@gmx.at>
This commit is contained in:
36
net/nfs-kernel-server/patches/100-nfs_utils_uclibc.patch
Normal file
36
net/nfs-kernel-server/patches/100-nfs_utils_uclibc.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
--- a/support/nfs/svc_socket.c
|
||||
+++ b/support/nfs/svc_socket.c
|
||||
@@ -40,10 +40,13 @@ int getservport(u_long number, const cha
|
||||
char rpcdata[1024], servdata[1024];
|
||||
struct rpcent rpcbuf, *rpcp;
|
||||
struct servent servbuf, *servp = NULL;
|
||||
- int ret;
|
||||
-
|
||||
+ int ret=0;
|
||||
+#ifndef __UCLIBC__
|
||||
ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof rpcdata,
|
||||
&rpcp);
|
||||
+#else
|
||||
+ rpcp = getrpcbynumber (number);
|
||||
+#endif
|
||||
if (ret == 0 && rpcp != NULL) {
|
||||
/* First try name. */
|
||||
ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,
|
||||
--- a/utils/mountd/cache.c
|
||||
+++ b/utils/mountd/cache.c
|
||||
@@ -166,6 +166,7 @@ static void auth_unix_gid(FILE *f)
|
||||
pw = getpwuid(uid);
|
||||
if (!pw)
|
||||
rv = -1;
|
||||
+#ifndef __UCLIBC__
|
||||
else {
|
||||
rv = getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
|
||||
if (rv == -1 && ngroups >= groups_len) {
|
||||
@@ -180,6 +181,7 @@ static void auth_unix_gid(FILE *f)
|
||||
}
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
qword_printuint(f, uid);
|
||||
qword_printtimefrom(f, DEFAULT_TTL);
|
||||
if (rv >= 0) {
|
||||
10
net/nfs-kernel-server/patches/101-no_malloc_h.patch
Normal file
10
net/nfs-kernel-server/patches/101-no_malloc_h.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- a/tools/rpcgen/rpc_cout.c
|
||||
+++ b/tools/rpcgen/rpc_cout.c
|
||||
@@ -36,7 +36,6 @@ static char sccsid[] = "@(#)rpc_cout.c 1
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
-#include <malloc.h>
|
||||
#include <ctype.h>
|
||||
#include "rpc_parse.h"
|
||||
#include "rpc_util.h"
|
||||
Reference in New Issue
Block a user