packages/net/nfs-kernel-server/patches/001-nfs_utils_uclibc.patch
nbd c3faff3e84 nfs-kernel-server: add a host build for rpcgen with the header file fixes, fix patching of generated files
git-svn-id: svn://svn.openwrt.org/openwrt/packages@25519 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-02-13 15:21:37 +00:00

36 lines
958 B
Diff

--- a/utils/mountd/cache.c
+++ b/utils/mountd/cache.c
@@ -142,6 +142,7 @@ 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 >= 100) {
@@ -153,6 +154,7 @@ void auth_unix_gid(FILE *f)
groups, &ngroups);
}
}
+#endif /* __UCLIBC__ */
qword_printint(f, uid);
qword_printint(f, time(0)+30*60);
if (rv >= 0) {
--- a/support/nfs/svc_socket.c
+++ b/support/nfs/svc_socket.c
@@ -66,9 +66,13 @@ svc_socket (u_long number, int type, int
memset (&addr, 0, sizeof (addr));
addr.sin_family = AF_INET;
-
+#ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata,
&rpcp);
+#else
+ rpcp = getrpcbynumber (number);
+ ret = 0;
+#endif
if (ret == 0 && rpcp != NULL)
{
/* First try name. */