1bdfbaa1e40605b6537ba2a3a15c4e88bf22f978
[openwrt/svn-archive/archive.git] / net / nfs-kernel-server / patches / 001-nfs_utils_1.0.6_uclibc.patch
1 diff -urN nfs-utils-1.1.5/support/nfs/svc_socket.c nfs-utils-1.1.5.new/support/nfs/svc_socket.c
2 --- nfs-utils-1.1.5/support/nfs/svc_socket.c 2009-03-05 12:42:56.000000000 +0100
3 +++ nfs-utils-1.1.5.new/support/nfs/svc_socket.c 2009-04-07 16:04:54.000000000 +0200
4 @@ -66,7 +66,7 @@
5
6 memset (&addr, 0, sizeof (addr));
7 addr.sin_family = AF_INET;
8 -
9 +#ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
10 ret = getrpcbynumber_r (number, &rpcbuf, rpcdata, sizeof rpcdata,
11 &rpcp);
12 if (ret == 0 && rpcp != NULL)
13 @@ -100,6 +100,7 @@
14 }
15 }
16 else
17 +#endif /* __UCLIBC__ */
18 {
19 addr.sin_port = 0;
20 if (bind (sock, (struct sockaddr *) &addr, len) < 0)
21 diff -urN nfs-utils-1.1.5/utils/mountd/cache.c nfs-utils-1.1.5.new/utils/mountd/cache.c
22 --- nfs-utils-1.1.5/utils/mountd/cache.c 2009-03-05 12:42:56.000000000 +0100
23 +++ nfs-utils-1.1.5.new/utils/mountd/cache.c 2009-04-07 16:11:09.000000000 +0200
24 @@ -142,6 +142,7 @@
25 pw = getpwuid(uid);
26 if (!pw)
27 rv = -1;
28 +#ifndef __UCLIBC__
29 else {
30 rv = getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
31 if (rv == -1 && ngroups >= 100) {
32 @@ -153,6 +154,7 @@
33 groups, &ngroups);
34 }
35 }
36 +#endif /* __UCLIBC__ */
37 qword_printint(f, uid);
38 qword_printint(f, time(0)+30*60);
39 if (rv >= 0) {