[packages] update nfs-kernel-server and nfs-utils to v1.2.5
rename patches and remove 002-no_ttycom_h.patch - it not needed anymore git-svn-id: svn://svn.openwrt.org/openwrt/packages@28743 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
49
net/nfs-kernel-server/patches/100-nfs_utils_uclibc.patch
Normal file
49
net/nfs-kernel-server/patches/100-nfs_utils_uclibc.patch
Normal file
@ -0,0 +1,49 @@
|
||||
--- a/support/include/sockaddr.h
|
||||
+++ b/support/include/sockaddr.h
|
||||
@@ -20,7 +20,10 @@
|
||||
#ifndef NFS_UTILS_SOCKADDR_H
|
||||
#define NFS_UTILS_SOCKADDR_H
|
||||
|
||||
+/* uClibc doesn't have/need libio.h */
|
||||
+#ifndef __UCLIBC__
|
||||
#include <libio.h>
|
||||
+#endif
|
||||
#include <stdbool.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
--- 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
|
||||
@@ -162,6 +162,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) {
|
||||
@@ -176,6 +177,7 @@ static void auth_unix_gid(FILE *f)
|
||||
}
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
qword_printuint(f, uid);
|
||||
qword_printuint(f, time(0) + DEFAULT_TTL);
|
||||
if (rv >= 0) {
|
Reference in New Issue
Block a user