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